X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=st.c;h=d8ff30b5a8746e07cc70ae00722772788ec7015a;hb=6530025bcaf3a65083667a93ae50035bd7137bae;hp=9eebbe435f4f0917fa881701ec0a173c7d676048;hpb=20c4f122543b67c0cdcefd151eb38b3bee599c10;p=st.git diff --git a/st.c b/st.c index 9eebbe4..d8ff30b 100644 --- a/st.c +++ b/st.c @@ -2311,13 +2311,13 @@ techo(char *buf, int len) { for(; len > 0; buf++, len--) { char c = *buf; - if(ISCONTROL(c)) { /* control code */ + if(ISCONTROL((uchar) c)) { /* control code */ if(c & 0x80) { c &= 0x7f; tputc("^", 1); tputc("[", 1); } else if(c != '\n' && c != '\r' && c != '\t') { - c ^= '\x40'; + c ^= 0x40; tputc("^", 1); } tputc(&c, 1); @@ -2700,14 +2700,12 @@ tresize(int col, int row) { /* resize each row to new width, zero-pad if needed */ for(i = 0; i < minrow; i++) { - term.dirty[i] = 1; term.line[i] = xrealloc(term.line[i], col * sizeof(Glyph)); term.alt[i] = xrealloc(term.alt[i], col * sizeof(Glyph)); } /* allocate any new rows */ for(/* i == minrow */; i < row; i++) { - term.dirty[i] = 1; term.line[i] = xmalloc(col * sizeof(Glyph)); term.alt[i] = xmalloc(col * sizeof(Glyph)); } @@ -2727,7 +2725,7 @@ tresize(int col, int row) { tsetscroll(0, row-1); /* make use of the LIMIT in tmoveto */ tmoveto(term.c.x, term.c.y); - /* Clearing both screens */ + /* Clearing both screens (it makes dirty all lines) */ orig = term.line; c = term.c; do {