Skip to content

Commit 8b1b297

Browse files
committed
Less to use alternate screen
1 parent 872f083 commit 8b1b297

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

less-34/less/screen.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,9 +736,11 @@ ltgetstr(capname, pp)
736736
if (strcmp(capname, "ke") == 0) // end keypad mode
737737
return NULL;
738738
if (strcmp(capname, "ti") == 0) // Startup terminal initialization
739-
return NULL;
739+
return "\033[?47h";
740+
// return NULL;
740741
if (strcmp(capname, "te") == 0) // End terminal initialization
741-
return NULL;
742+
return "\033[?47l";
743+
// return NULL;
742744
if (strcmp(capname, "ce") == 0) // Clear to end of line
743745
return "\033[K";
744746
if (strcmp(capname, "cd") == 0) // Clear to end of screen

0 commit comments

Comments
 (0)