diff options
| author | Maxime Coste <mawww@kakoune.org> | 2019-07-21 12:20:47 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2019-07-21 12:20:47 +1000 |
| commit | 1a165909601eae0c4e78c8cbe629cde78b1140bf (patch) | |
| tree | b13360f6323fc2d1ba6e4253b2eb430ffd94d51d /src/input_handler.cc | |
| parent | b83c09509e9389b3f9e61824ec9047b0f94d8919 (diff) | |
Slight code cleanup in prompt history handling
Diffstat (limited to 'src/input_handler.cc')
| -rw-r--r-- | src/input_handler.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc index a048cc05..6e6b1e20 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -789,8 +789,7 @@ public: completion); } - if (not context().history_disabled()) - history_push(line); + history_push(line); context().print_status(DisplayLine{}); if (context().has_client()) context().client().menu_hide(); @@ -806,8 +805,7 @@ public: } else if (key == Key::Escape or key == ctrl('c')) { - if (not context().history_disabled()) - history_push(line); + history_push(line); context().print_status(DisplayLine{}); if (context().has_client()) context().client().menu_hide(); @@ -1103,7 +1101,7 @@ private: void history_push(StringView entry) { - if (entry.empty() or + if (entry.empty() or context().history_disabled() or (m_flags & PromptFlags::DropHistoryEntriesWithBlankPrefix and is_horizontal_blank(entry[0_byte]))) return; |
