diff options
Diffstat (limited to 'Src/hist.c')
-rw-r--r-- | Src/hist.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/hist.c b/Src/hist.c index a37b230b0..329e988a7 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -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 { |