diff options
Diffstat (limited to 'contrib/less/option.c')
-rw-r--r-- | contrib/less/option.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/less/option.c b/contrib/less/option.c index 2c26dc6..256f569 100644 --- a/contrib/less/option.c +++ b/contrib/less/option.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2012 Mark Nudelman + * Copyright (C) 1984-2015 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -152,7 +152,10 @@ scan_option(s) if (*str == '+') every_first_cmd = save(str+1); else + { + ungetcc(CHAR_END_COMMAND); ungetsc(str); + } free(str); continue; case '0': case '1': case '2': case '3': case '4': @@ -701,5 +704,5 @@ get_quit_at_eof() if (!less_is_more) return quit_at_eof; /* When less_is_more is set, the -e flag semantics are different. */ - return quit_at_eof ? OPT_ON : OPT_ONPLUS; + return quit_at_eof ? OPT_ONPLUS : OPT_ON; } |