[hackers] [st] Import the patch of Eckehard Berns to add insert mode. Thanks! || Christoph Lohmann

From: <hg_AT_suckless.org>
Date: Thu, 15 Nov 2012 16:28:52 +0100 (CET)

changeset: 412:17770cef1d01
user: Christoph Lohmann <20h_AT_r-36.net>
date: Thu Nov 15 16:21:23 2012 +0100
files: st.c st.info
description:
Import the patch of Eckehard Berns to add insert mode. Thanks!


diff -r 08ef23cf0902 -r 17770cef1d01 st.c
--- a/st.c Thu Nov 15 15:57:01 2012 +0100
+++ b/st.c Thu Nov 15 16:21:23 2012 +0100
_AT_@ -2100,6 +2100,10 @@
                 sel.bx = -1;
         if(IS_SET(MODE_WRAP) && term.c.state & CURSOR_WRAPNEXT)
                 tnewline(1); /* always go to first col */
+ if(IS_SET(MODE_INSERT) && term.c.x+1 < term.col)
+ memmove(&term.line[term.c.y][term.c.x+1],
+ &term.line[term.c.y][term.c.x],
+ (term.col - term.c.x - 1) * sizeof(Glyph));
         tsetchar(c, &term.c.attr, term.c.x, term.c.y);
         if(term.c.x+1 < term.col)
                 tmoveto(term.c.x+1, term.c.y);
diff -r 08ef23cf0902 -r 17770cef1d01 st.info
--- a/st.info Thu Nov 15 15:57:01 2012 +0100
+++ b/st.info Thu Nov 15 16:21:23 2012 +0100
_AT_@ -153,6 +153,7 @@
         ritm=\E[23m,
         rmacs=\E(B,
         rmcup=\E[?1049l,
+ rmir=\E[4l,
         rmkx=\E[?1l\E>,
         rmso=\E[23m,
         rmul=\E[m,
_AT_@ -168,6 +169,7 @@
         sitm=\E[3m,
         smacs=\E(0,
         smcup=\E[?1049h,
+ smir=\E[4h,
         smkx=\E[?1h\E=,
         smso=\E[3m,
         smul=\E[4m,
Received on Thu Nov 15 2012 - 16:28:52 CET

This archive was generated by hypermail 2.3.0 : Thu Nov 15 2012 - 16:36:08 CET