mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-26 19:31:15 -03:00
Commit transient edit when closing pager
When selecting items in the pager, only the latest of those items is kept in the edit history, as so-called transient edit. Each new transient edit evicts any old transient edit (via undo). If the pager is closed by a command that performs another transient edit (like history-token-search-backward) we thus inadvertently undo (= remove) the token inserted by the pager. Fix this by closing a transient edit session when closing the pager. Token search will start its own session. Fixes #9160
This commit is contained in:
@@ -2045,6 +2045,7 @@ void reader_data_t::accept_autosuggestion(bool full, bool single, move_word_styl
|
||||
void reader_data_t::clear_pager() {
|
||||
pager.clear();
|
||||
history_pager_active = false;
|
||||
command_line_has_transient_edit = false;
|
||||
}
|
||||
|
||||
void reader_data_t::select_completion_in_direction(selection_motion_t dir,
|
||||
|
||||
Reference in New Issue
Block a user