aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-08-25 13:45:08 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-08-25 13:45:08 -0700
commitc0970c42209c707f14e6ef6d50dd5861682a11ae (patch)
tree1e11b4b3965bcc840da49fec827c97633f527f5a
parent2d0b5685594d23355ed9aa9f6f43acdc7b6c64bf (diff)
downloaduemacs-c0970c42209c707f14e6ef6d50dd5861682a11ae.tar.gz
Force a screen re-draw after tcap 'ti' on terminal open
The 'tcapkopen()' function re-initializes the terminal with the 'ti' sequence, which for most sane termcap entries is just empty. But for 'xterm', that seems to actually be a real control sequence (clear and reset?), and we'd better tell display.c that the screen is now garbage and needs to be re-drawn. Also, make tcapkclose() match the 'ti' (terminal init) with a 'te' (terminal exit). Maybe we should just stop playing games with ti/te, but this at least improves the situation a bit. Reported-by: Bijan Soleymani <bijan@psq.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--tcap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tcap.c b/tcap.c
index 33a2f22..fa71fa6 100644
--- a/tcap.c
+++ b/tcap.c
@@ -229,12 +229,19 @@ static void tcapkopen(void)
#if PKCODE
putpad(TI);
ttflush();
+ ttrow = 999;
+ ttcol = 999;
+ sgarbf = TRUE;
#endif
strcpy(sres, "NORMAL");
}
static void tcapkclose(void)
{
+#if PKCODE
+ putpad(TE);
+ ttflush();
+#endif
}
static void tcapmove(int row, int col)