Skip to content

Commit

Permalink
Force a screen re-draw after tcap 'ti' on terminal open
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
torvalds committed Aug 25, 2011
1 parent 2d0b568 commit c0970c4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c0970c4

Please sign in to comment.