aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2010-08-22 19:46:46 +0200
committerAurélien Aptel <aurelien.aptel@gmail.com>2010-08-22 19:46:46 +0200
commita7922bd1d94ace6d14e40a27820e217cd6c4e632 (patch)
tree9441bd9b362384260de3cc1d1a9415462a319fbb
parentce3f4fc647be3ab28f934db9365445a56ebd85bf (diff)
downloadst-a7922bd1d94ace6d14e40a27820e217cd6c4e632.tar.gz
st-a7922bd1d94ace6d14e40a27820e217cd6c4e632.zip
added F1-12 key, fixed DCH and ICH.
-rw-r--r--config.h12
-rw-r--r--st.c8
-rw-r--r--st.info12
3 files changed, 28 insertions, 4 deletions
diff --git a/config.h b/config.h
index c3c4e41..bb490ab 100644
--- a/config.h
+++ b/config.h
@@ -39,6 +39,18 @@ static Key key[] = {
39 { XK_End, "\033[4~" }, 39 { XK_End, "\033[4~" },
40 { XK_Prior, "\033[5~" }, 40 { XK_Prior, "\033[5~" },
41 { XK_Next, "\033[6~" }, 41 { XK_Next, "\033[6~" },
42 { XK_F1, "\033OP" },
43 { XK_F2, "\033OQ" },
44 { XK_F3, "\033OR" },
45 { XK_F4, "\033OS" },
46 { XK_F5, "\033[15~" },
47 { XK_F6, "\033[17~" },
48 { XK_F7, "\033[18~" },
49 { XK_F8, "\033[19~" },
50 { XK_F9, "\033[20~" },
51 { XK_F10, "\033[21~" },
52 { XK_F11, "\033[23~" },
53 { XK_F12, "\033[24~" },
42}; 54};
43 55
44static char gfx[] = { 56static char gfx[] = {
diff --git a/st.c b/st.c
index f8d2257..6e34f1e 100644
--- a/st.c
+++ b/st.c
@@ -497,21 +497,21 @@ tdeletechar(int n) {
497 return; 497 return;
498 } 498 }
499 memmove(&term.line[term.c.y][dst], &term.line[term.c.y][src], size * sizeof(Glyph)); 499 memmove(&term.line[term.c.y][dst], &term.line[term.c.y][src], size * sizeof(Glyph));
500 tclearregion(term.col-size, term.c.y, term.col-1, term.c.y); 500 tclearregion(term.col-n, term.c.y, term.col-1, term.c.y);
501} 501}
502 502
503void 503void
504tinsertblank(int n) { 504tinsertblank(int n) {
505 int src = term.c.x; 505 int src = term.c.x;
506 int dst = src + n; 506 int dst = src + n;
507 int size = term.col - n - src; 507 int size = term.col - dst;
508 508
509 if(dst >= term.col) { 509 if(dst >= term.col) {
510 tclearregion(term.c.x, term.c.y, term.col-1, term.c.y); 510 tclearregion(term.c.x, term.c.y, term.col-1, term.c.y);
511 return; 511 return;
512 } 512 }
513 memmove(&term.line[term.c.y][dst], &term.line[term.c.y][src], size * sizeof(Glyph)); 513 memmove(&term.line[term.c.y][dst], &term.line[term.c.y][src], size * sizeof(Glyph));
514 tclearregion(src, term.c.y, dst, term.c.y); 514 tclearregion(src, term.c.y, dst - 1, term.c.y);
515} 515}
516 516
517void 517void
@@ -1173,7 +1173,7 @@ xcursor(int mode) {
1173 1173
1174 if(term.line[term.c.y][term.c.x].state & GLYPH_SET) 1174 if(term.line[term.c.y][term.c.x].state & GLYPH_SET)
1175 g.c = term.line[term.c.y][term.c.x].c; 1175 g.c = term.line[term.c.y][term.c.x].c;
1176 1176
1177 /* remove the old cursor */ 1177 /* remove the old cursor */
1178 if(term.line[oldy][oldx].state & GLYPH_SET) 1178 if(term.line[oldy][oldx].state & GLYPH_SET)
1179 xdraws(&term.line[oldy][oldx].c, term.line[oldy][oldx], oldx, oldy, 1); 1179 xdraws(&term.line[oldy][oldx].c, term.line[oldy][oldx], oldx, oldy, 1);
diff --git a/st.info b/st.info
index b2669dd..2cc645b 100644
--- a/st.info
+++ b/st.info
@@ -37,6 +37,18 @@ st| simpleterm,
37 kcuu1=\E[A, 37 kcuu1=\E[A,
38 kdch1=\E[3~, 38 kdch1=\E[3~,
39 kend=\E[4~, 39 kend=\E[4~,
40 kf1=\EOP,
41 kf2=\EOQ,
42 kf3=\EOR,
43 kf4=\EOS,
44 kf5=\E[15~,
45 kf6=\E[17~,
46 kf7=\E[18~,
47 kf8=\E[19~,
48 kf9=\E[20~,
49 kf10=\E[21~,
50 kf11=\E[23~,
51 kf12=\E[24~,
40 khome=\E[1~, 52 khome=\E[1~,
41 knp=\E[6~, 53 knp=\E[6~,
42 kpp=\E[5~, 54 kpp=\E[5~,