diff options
Diffstat (limited to 'contrib/less/edit.c')
-rw-r--r-- | contrib/less/edit.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/contrib/less/edit.c b/contrib/less/edit.c index 5f4e679..2a35ade 100644 --- a/contrib/less/edit.c +++ b/contrib/less/edit.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. @@ -64,7 +64,7 @@ init_textlist(tlist, str) int meta_quoted = 0; int delim_quoted = 0; char *esc = get_meta_escape(); - int esclen = strlen(esc); + int esclen = (int) strlen(esc); #endif tlist->string = skipsp(str); @@ -411,7 +411,10 @@ edit_ifile(ifile) } #endif if (every_first_cmd != NULL) + { + ungetcc(CHAR_END_COMMAND); ungetsc(every_first_cmd); + } } free(qopen_filename); @@ -433,7 +436,8 @@ edit_ifile(ifile) #if HILITE_SEARCH clr_hilite(); #endif - cmd_addhist(ml_examine, filename); + if (strcmp(filename, FAKE_HELPFILE) && strcmp(filename, FAKE_EMPTYFILE)) + cmd_addhist(ml_examine, filename, 1); if (no_display && errmsgs > 0) { /* @@ -745,7 +749,8 @@ use_logfile(filename) */ filename = shell_unquote(filename); exists = open(filename, OPEN_READ); - close(exists); + if (exists >= 0) + close(exists); exists = (exists >= 0); /* |