mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:21:15 -03:00
Changed iterators from iter++ to ++iter
Large set of changes to history to ensure that histories from other sessions don't "bleed" into the current session
This commit is contained in:
15
history.h
15
history.h
@@ -34,10 +34,13 @@ class history_item_t {
|
||||
private:
|
||||
explicit history_item_t(const wcstring &);
|
||||
explicit history_item_t(const wcstring &, time_t, const path_list_t &paths = path_list_t());
|
||||
|
||||
/** Attempts to merge two compatible history items together */
|
||||
bool merge(const history_item_t &item);
|
||||
|
||||
/** The actual contents of the entry */
|
||||
wcstring contents;
|
||||
|
||||
|
||||
/** Original creation time for the entry */
|
||||
time_t creation_timestamp;
|
||||
|
||||
@@ -101,9 +104,10 @@ class history_t {
|
||||
/** The size of the mmaped region */
|
||||
size_t mmap_length;
|
||||
|
||||
/**
|
||||
Timestamp of last save
|
||||
*/
|
||||
/** Timestamp of when this history was created */
|
||||
const time_t birth_timestamp;
|
||||
|
||||
/** Timestamp of last save */
|
||||
time_t save_timestamp;
|
||||
|
||||
static history_item_t decode_item(const char *ptr, size_t len);
|
||||
@@ -119,6 +123,9 @@ class history_t {
|
||||
/** Loads old if necessary */
|
||||
void load_old_if_needed(void);
|
||||
|
||||
/** Deletes duplicates in new_items. */
|
||||
void compact_new_items();
|
||||
|
||||
/** Saves history */
|
||||
void save_internal();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user