summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/less/screen.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/usr.bin/less/screen.c b/usr.bin/less/screen.c
index 6d081d8c5e0..e91d905dead 100644
--- a/usr.bin/less/screen.c
+++ b/usr.bin/less/screen.c
@@ -773,7 +773,7 @@ get_term()
* that switch to/from an alternate screen, and we're in quit_at_eof
* (eg, more(1)).
*/
- if (!more_mode) {
+ if (!quit_at_eof && !more_mode) {
sc_init = tgetstr("ti", &sp);
sc_deinit = tgetstr("te", &sp);
}
@@ -1001,9 +1001,7 @@ init()
if (no_init)
return;
tputs(sc_init, sc_height, putchr);
-#if 0
tputs(sc_s_keypad, sc_height, putchr);
-#endif
init_done = 1;
}
@@ -1017,9 +1015,7 @@ deinit()
return;
if (!init_done)
return;
-#if 0
tputs(sc_e_keypad, sc_height, putchr);
-#endif
tputs(sc_deinit, sc_height, putchr);
init_done = 0;
}