diff options
author | Daniel Jacobowitz <drow@false.org> | 2006-04-24 22:00:27 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2006-04-24 22:00:27 +0000 |
commit | 23e2f935d058f72a6dada4c83c740fd4e3dcc6ed (patch) | |
tree | 222dfd22cda9f7a158f58e9cb545f68c849dca98 /readline/histsearch.c | |
parent | 49b5a1f5dc74a0e693a51409252b3d590cc00bbb (diff) | |
download | binutils-readline_5_1-import-branch.zip binutils-readline_5_1-import-branch.tar.gz binutils-readline_5_1-import-branch.tar.bz2 |
Import readline 5.1 on the branch.readline_5_1-import-branch
Diffstat (limited to 'readline/histsearch.c')
-rw-r--r-- | readline/histsearch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/readline/histsearch.c b/readline/histsearch.c index d94fd6c..1cc5875 100644 --- a/readline/histsearch.c +++ b/readline/histsearch.c @@ -77,11 +77,11 @@ history_search_internal (string, direction, anchored) if (string == 0 || *string == '\0') return (-1); - if (!history_length || ((i == history_length) && !reverse)) + if (!history_length || ((i >= history_length) && !reverse)) return (-1); - if (reverse && (i == history_length)) - i--; + if (reverse && (i >= history_length)) + i = history_length - 1; #define NEXT_LINE() do { if (reverse) i--; else i++; } while (0) |