diff --git a/src/reader.cpp b/src/reader.cpp index a6ecf848f..83e37635a 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -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, diff --git a/tests/checks/tmux-complete.fish b/tests/checks/tmux-complete.fish index d810b4527..0e3365968 100644 --- a/tests/checks/tmux-complete.fish +++ b/tests/checks/tmux-complete.fish @@ -68,3 +68,9 @@ isolated-tmux capture-pane -p | head -1 # The second one is the autosuggestion. Maybe we should turn them off for this test. # TODO there should be a prefix ("prompt 4> foo4") but we fail to draw that in this case. # CHECK: {{.*}} b-short-arg a-long-arg{{.*}} + +# Check that completion pager followed by token search search inserts two separate tokens. +isolated-tmux send-keys C-u echo Space old-arg Enter C-l foo2 Space Tab Tab M-. +tmux-sleep +isolated-tmux capture-pane -p +# CHECK: prompt 5> foo2 aabc old-arg