Be more careful handling no_init flag. It should be enforced
in *all* less_is_more cases, On the other hand, quit_if_one_screen should apply iff less_is_more *and* -e. This change revises the previous change further, which tried to make less(1) not to send @ti:@te before and after view of one file in more(1) mode, but affected less -e behavior by accident. This is essentially the same patch desichen@ has posted on -current@. I have adjusted it a bit in order to minimize difference between our version and the vendor branch. Approved by: re (bmah, earlier logically equivalent version)
This commit is contained in:
parent
098935f8d5
commit
8590152414
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171817
@ -165,8 +165,10 @@ main(argc, argv)
|
|||||||
quit(QUIT_OK);
|
quit(QUIT_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (less_is_more || get_quit_at_eof())
|
if (less_is_more)
|
||||||
no_init = quit_if_one_screen = TRUE;
|
no_init = TRUE;
|
||||||
|
if (less_is_more && get_quit_at_eof())
|
||||||
|
quit_if_one_screen = TRUE;
|
||||||
|
|
||||||
#if EDITOR
|
#if EDITOR
|
||||||
editor = lgetenv("VISUAL");
|
editor = lgetenv("VISUAL");
|
||||||
|
Loading…
Reference in New Issue
Block a user