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.
git-svn-id: svn://svn.tartarus.org/sgt/putty@3222
cda61777-01e9-0310-a592-
d414129be87e
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;