reader: repaint commands to not disable "last_cmd"-based UI states (pager etc.)

"commandline -f repaint" might be triggered for various reasons;
since this sets "last_cmd", it will reset some UI states, notably
pager selection:

1. press tab
2. trigger repaint
3. press tab

The repaint prevents us from selecting the first candidate.

Work around this by ignoring repaint events for the last_cmd logic.

Fixes #12683
This commit is contained in:
Johannes Altmanninger
2026-04-28 14:19:13 +08:00
parent c91bfba08c
commit f2b0706494
3 changed files with 26 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ isolated-tmux-start -C '
bind ctrl-g,E "set -g fish_color_command 333"
bind ctrl-g,F "set -U fish_color_param 444"
bind ctrl-g,G "set -eg fish_color_command"
bind ctrl-g,R repaint
'
isolated-tmux capture-pane -p
@@ -45,3 +46,14 @@ isolated-tmux send-keys C-g G
tmux-sleep
isolated-tmux capture-pane -p
# CHECK: 5>
isolated-tmux send-keys status Space Tab C-g R Tab
tmux-sleep
isolated-tmux capture-pane -p | sed 2q
# CHECK: 6> status
# CHECK: basename (Print the file name (without the path) of the currently running scr…)
isolated-tmux send-keys C-g R Tab
tmux-sleep
isolated-tmux capture-pane -p | sed 2q
# CHECK: 7> status basename
# CHECK: basename (Print the file name (without the path) of the currently running scr…)