diff options
author | Siteshwar Vashisht <siteshwar@gmail.com> | 2012-06-05 09:54:42 +0530 |
---|---|---|
committer | Siteshwar Vashisht <siteshwar@gmail.com> | 2012-06-05 09:54:42 +0530 |
commit | ec34f2527a2c6738437a3339c490a9849c185247 (patch) | |
tree | 46fbe890eac6c277a120c2bafe1929716750a160 /history.h | |
parent | b877181e172d04b90823412cb6e005b40608777d (diff) |
Adding history builtin
Diffstat (limited to 'history.h')
-rw-r--r-- | history.h | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -64,6 +64,10 @@ class history_item_t { creation_timestamp == other.creation_timestamp && required_paths == other.required_paths; } + + bool match_contents(const history_item_t &other) const { + return contents == other.contents; + } /* Functions for testing only */ @@ -96,7 +100,10 @@ private: /** New items. */ std::vector<history_item_t> new_items; - + + /** Deleted items. */ + std::vector<history_item_t> deleted_items; + /** How many items we've added without saving */ size_t unsaved_item_count; @@ -137,6 +144,9 @@ public: /** Add a new history item to the end */ void add(const wcstring &str, const path_list_t &valid_paths = path_list_t()); + + /** Remove a history item */ + void remove(const wcstring &str); /** Add a new history item to the end */ void add_with_file_detection(const wcstring &str); @@ -152,6 +162,8 @@ public: /** Return the specified history at the specified index. 0 is the index of the current commandline. (So the most recent item is at index 1.) */ history_item_t item_at_index(size_t idx); + + bool is_deleted(const history_item_t &item) const; }; class history_search_t { |