mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Experimental change in the behaviour of `disable alternate terminal
screen'. Now it also disables the save-and-restore-cursor behaviour of ESC[?1048h and ESC[?1049h, since these sequences seem to be output by software trying to switch to the alternate screen, and it looks very odd to have the cursor position restored to where it was before `less' when the garbage `less' wrote all over the screen is still around. The `traditional' ESC 7 and ESC 8 still function as normal, on the basis that they aren't usually used in conjunction with the alternate screen. I'm not sure whether this will be the right decision; I'm prepared to change it back if a sufficiently serious counterexample shows up. [originally from svn r3222]
This commit is contained in:
parent
e955cc77ce
commit
171ce1e780
@ -1263,17 +1263,18 @@ static void toggle_mode(Terminal *term, int mode, int query, int state)
|
||||
term->disptop = 0;
|
||||
break;
|
||||
case 1048: /* save/restore cursor */
|
||||
save_cursor(term, state);
|
||||
if (!term->cfg.no_alt_screen)
|
||||
save_cursor(term, state);
|
||||
if (!state) term->seen_disp_event = TRUE;
|
||||
break;
|
||||
case 1049: /* cursor & alternate screen */
|
||||
if (state)
|
||||
if (state && !term->cfg.no_alt_screen)
|
||||
save_cursor(term, state);
|
||||
if (!state) term->seen_disp_event = TRUE;
|
||||
compatibility(OTHER);
|
||||
deselect(term);
|
||||
swap_screen(term, term->cfg.no_alt_screen ? 0 : state, TRUE, FALSE);
|
||||
if (!state)
|
||||
if (!state && !term->cfg.no_alt_screen)
|
||||
save_cursor(term, state);
|
||||
term->disptop = 0;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user