summaryrefslogtreecommitdiffstats
path: root/contrib/less
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2007-08-13 16:15:26 +0000
committerdelphij <delphij@FreeBSD.org>2007-08-13 16:15:26 +0000
commit5c8a6bfaa138626e35408df59c60c7586b293d20 (patch)
tree5990e903138ef16b3885f7e75851b7d8f1cd9e58 /contrib/less
parent70af7ac57edb5225426f48b19b625f4133bdf8d1 (diff)
downloadFreeBSD-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/less')
-rw-r--r--contrib/less/main.c6
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");
OpenPOWER on IntegriCloud