diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-05 22:48:43 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-05 22:48:43 -0800 |
commit | c82410bfda4111e01e8d31e5139df938814729d8 (patch) | |
tree | 39fbcb78eec2a4e502b608208ae8447b3c158650 /history.cpp | |
parent | 00ad837eb46e4acf0f8904f8af735cbd6f403bac (diff) |
Fixed history tests
Diffstat (limited to 'history.cpp')
-rw-r--r-- | history.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/history.cpp b/history.cpp index 33659996..e59f2486 100644 --- a/history.cpp +++ b/history.cpp @@ -345,10 +345,12 @@ void history_t::load_old_if_needed(void) } bool history_search_t::go_forwards() { - /* Pop the top index (if any) and return if we have any left */ - if (! prev_matches.empty()) + /* Pop the top index (if more than one) and return if we have any left */ + if (prev_matches.size() > 1) { prev_matches.pop_back(); - return ! prev_matches.empty(); + return true; + } + return false; } bool history_search_t::go_backwards() { |