aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--st.c25
2 files changed, 9 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index 5267411..920bd9a 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ OBJ = ${SRC:.c=.o}
8 8
9all: options st 9all: options st
10 10
11options: options 11options:
12 @echo st build options: 12 @echo st build options:
13 @echo "CFLAGS = ${CFLAGS}" 13 @echo "CFLAGS = ${CFLAGS}"
14 @echo "LDFLAGS = ${LDFLAGS}" 14 @echo "LDFLAGS = ${LDFLAGS}"
diff --git a/st.c b/st.c
index 0b21404..6a90176 100644
--- a/st.c
+++ b/st.c
@@ -828,22 +828,17 @@ csihandle(void) {
828 case 25: 828 case 25:
829 term.c.state |= CURSOR_HIDE; 829 term.c.state |= CURSOR_HIDE;
830 break; 830 break;
831 case 1049: /* = 1047 and 1048 */
831 case 1047: 832 case 1047:
832 if(IS_SET(MODE_ALTSCREEN)) { 833 if(IS_SET(MODE_ALTSCREEN)) {
833 tclearregion(0, 0, term.col-1, term.row-1); 834 tclearregion(0, 0, term.col-1, term.row-1);
834 tswapscreen(); 835 tswapscreen();
835 } 836 }
836 break; 837 if(escseq.arg[0] == 1047)
838 break;
837 case 1048: 839 case 1048:
838 tcursor(CURSOR_LOAD); 840 tcursor(CURSOR_LOAD);
839 break; 841 break;
840 case 1049:
841 tcursor(CURSOR_LOAD);
842 if(IS_SET(MODE_ALTSCREEN)) {
843 tclearregion(0, 0, term.col-1, term.row-1);
844 tswapscreen();
845 }
846 break;
847 default: 842 default:
848 goto unknown; 843 goto unknown;
849 } 844 }
@@ -888,22 +883,17 @@ csihandle(void) {
888 case 25: 883 case 25:
889 term.c.state &= ~CURSOR_HIDE; 884 term.c.state &= ~CURSOR_HIDE;
890 break; 885 break;
886 case 1049: /* = 1047 and 1048 */
891 case 1047: 887 case 1047:
892 if(IS_SET(MODE_ALTSCREEN)) 888 if(IS_SET(MODE_ALTSCREEN))
893 tclearregion(0, 0, term.col-1, term.row-1); 889 tclearregion(0, 0, term.col-1, term.row-1);
894 else 890 else
895 tswapscreen(); 891 tswapscreen();
896 break; 892 if(escseq.arg[0] == 1047)
893 break;
897 case 1048: 894 case 1048:
898 tcursor(CURSOR_SAVE); 895 tcursor(CURSOR_SAVE);
899 break; 896 break;
900 case 1049:
901 tcursor(CURSOR_SAVE);
902 if(IS_SET(MODE_ALTSCREEN))
903 tclearregion(0, 0, term.col-1, term.row-1);
904 else
905 tswapscreen();
906 break;
907 default: goto unknown; 897 default: goto unknown;
908 } 898 }
909 } else { 899 } else {
@@ -1222,6 +1212,7 @@ xinit(void) {
1222 xw.bufw = xw.w - 2*BORDER; 1212 xw.bufw = xw.w - 2*BORDER;
1223 xw.bufh = xw.h - 2*BORDER; 1213 xw.bufh = xw.h - 2*BORDER;
1224 xw.buf = XCreatePixmap(xw.dis, xw.win, xw.bufw, xw.bufh, XDefaultDepth(xw.dis, xw.scr)); 1214 xw.buf = XCreatePixmap(xw.dis, xw.win, xw.bufw, xw.bufh, XDefaultDepth(xw.dis, xw.scr));
1215 xw.hasfocus = 1;
1225 /* gc */ 1216 /* gc */
1226 dc.gc = XCreateGC(xw.dis, xw.win, 0, NULL); 1217 dc.gc = XCreateGC(xw.dis, xw.win, 0, NULL);
1227 XMapWindow(xw.dis, xw.win); 1218 XMapWindow(xw.dis, xw.win);
@@ -1322,7 +1313,7 @@ draw(int redraw_all) {
1322 for(x = 0; x < term.col; x++) { 1313 for(x = 0; x < term.col; x++) {
1323 new = term.line[y][x]; 1314 new = term.line[y][x];
1324 if(selbx!=-1 && new.c && selected(x, y)) 1315 if(selbx!=-1 && new.c && selected(x, y))
1325 new.mode = ATTR_REVERSE; 1316 new.mode ^= ATTR_REVERSE;
1326 if(i > 0 && (!(new.state & GLYPH_SET) || ATTRCMP(base, new) || 1317 if(i > 0 && (!(new.state & GLYPH_SET) || ATTRCMP(base, new) ||
1327 i >= DRAW_BUF_SIZ)) { 1318 i >= DRAW_BUF_SIZ)) {
1328 xdraws(buf, base, ox, y, i); 1319 xdraws(buf, base, ox, y, i);