diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-05 23:22:18 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-05 23:22:18 -0800 |
commit | b14683200a881b6b723d21289d05530131118a2d (patch) | |
tree | 3b7344445630ccf5cb996f2c187b4953bd12fa8a /history.h | |
parent | c82410bfda4111e01e8d31e5139df938814729d8 (diff) |
Change the history so that when you go forwards, it no longer highlights
Diffstat (limited to 'history.h')
-rw-r--r-- | history.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -30,7 +30,10 @@ class history_item_t { public: const wcstring &str() const { return contents; } bool empty() const { return contents.empty(); } - bool matches_search(const wcstring &val) const { return contents.find(val) != wcstring::npos; } + + /* We consider equal strings to NOT match a search (so that you don't have to see history equal to what you typed) */ + bool matches_search(const wcstring &val) const { return contents.size() > val.size() && contents.find(val) != wcstring::npos; } + time_t timestamp() const { return creation_timestamp; } bool write_to_file(FILE *f) const; @@ -124,6 +127,9 @@ class history_search_t { /** Goes to the end (forwards) */ void go_to_end(void); + /** Returns if we are at the end. We start out at the end. */ + bool is_at_end(void) const; + /** Goes to the beginning (backwards) */ void go_to_beginning(void); |