In more(1) mode, restore the historical behavior where curses init
and deinit characters are not delivered. Instead of hacking screen.c, we set no_init to implement the behavior. Reported by: mnag Approved by: re (hrs)
This commit is contained in:
parent
f9bbf742ee
commit
666ae690ac
@ -59,6 +59,7 @@ static char consoleTitle[256];
|
||||
extern int missing_cap;
|
||||
extern int know_dumb;
|
||||
extern int quit_if_one_screen;
|
||||
extern int no_init;
|
||||
extern int pr_type;
|
||||
|
||||
|
||||
@ -165,7 +166,7 @@ main(argc, argv)
|
||||
}
|
||||
|
||||
if (less_is_more && get_quit_at_eof())
|
||||
quit_if_one_screen = TRUE;
|
||||
no_init = quit_if_one_screen = TRUE;
|
||||
|
||||
#if EDITOR
|
||||
editor = lgetenv("VISUAL");
|
||||
|
@ -228,8 +228,6 @@ extern int quiet; /* If VERY_QUIET, use visual bell for bell */
|
||||
extern int no_back_scroll;
|
||||
extern int swindow;
|
||||
extern int no_init;
|
||||
extern int quit_at_eof;
|
||||
extern int less_is_more;
|
||||
extern int no_keypad;
|
||||
extern int sigs;
|
||||
extern int wscroll;
|
||||
@ -1211,19 +1209,11 @@ get_term()
|
||||
if (sc_e_keypad == NULL)
|
||||
sc_e_keypad = "";
|
||||
|
||||
/*
|
||||
* This loses for terminals with termcap entries with ti/te strings
|
||||
* that switch to/from an alternate screen, and we're in quit_at_eof
|
||||
* (eg, more(1)).
|
||||
*/
|
||||
if (!quit_at_eof && !less_is_more) {
|
||||
sc_init = ltgetstr("ti", &sp);
|
||||
sc_deinit = ltgetstr("te", &sp);
|
||||
}
|
||||
|
||||
sc_init = ltgetstr("ti", &sp);
|
||||
if (sc_init == NULL)
|
||||
sc_init = "";
|
||||
|
||||
sc_deinit= ltgetstr("te", &sp);
|
||||
if (sc_deinit == NULL)
|
||||
sc_deinit = "";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user