diff options
author | delphij <delphij@FreeBSD.org> | 2007-08-13 16:15:26 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2007-08-13 16:15:26 +0000 |
commit | 5c8a6bfaa138626e35408df59c60c7586b293d20 (patch) | |
tree | 5990e903138ef16b3885f7e75851b7d8f1cd9e58 /contrib | |
parent | 70af7ac57edb5225426f48b19b625f4133bdf8d1 (diff) | |
download | FreeBSD-src-5c8a6bfaa138626e35408df59c60c7586b293d20.zip FreeBSD-src-5c8a6bfaa138626e35408df59c60c7586b293d20.tar.gz |
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)
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/less/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/less/main.c b/contrib/less/main.c index d1d07ff..17201a9 100644 --- a/contrib/less/main.c +++ b/contrib/less/main.c @@ -165,8 +165,10 @@ main(argc, argv) quit(QUIT_OK); } - if (less_is_more || get_quit_at_eof()) - no_init = quit_if_one_screen = TRUE; + if (less_is_more) + no_init = TRUE; + if (less_is_more && get_quit_at_eof()) + quit_if_one_screen = TRUE; #if EDITOR editor = lgetenv("VISUAL"); |