1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-12-09 18:51:46 +01:00

+ Changed addhistnum() to return firsthist()-1 or curhist+1 on error.

+ Ignore the "r" command if HIST_NO_STORE is set.
This commit is contained in:
Wayne Davison 2001-09-13 18:19:11 +00:00
parent 6a7d256a58
commit fc89b8135a

View file

@ -845,7 +845,7 @@ addhistnum(int hl, int n, int xflags)
if (n)
he = movehistent(he, n, xflags);
if (!he)
return dir < 0? firsthist() : curhist;
return dir < 0? firsthist() - 1 : curhist + 1;
return he->histnum;
}
@ -994,6 +994,8 @@ should_ignore_line(Eprog prog)
if (*b == 'h' && strncmp(b, "history", 7) == 0
&& (!b[7] || b[7] == ' '))
return 1;
if (*b == 'r' && (!b[1] || b[1] == ' '))
return 1;
if (*b == 'f' && b[1] == 'c' && b[2] == ' ' && b[3] == '-') {
b += 3;
do {