Refresh TTY timestamps after nextd/prevd

This fixes a macOS-specific bug.  See 390b40e02 (Fix regression not refreshing
TTY timestamps after external command from binding, 2024-05-29) and 8a7c3ceec
(Don't abandon line after writing control sequences, 2024-04-06).

Fixes #10779
This commit is contained in:
Johannes Altmanninger 2024-10-13 07:55:31 +02:00
parent 3a02a3bd6c
commit ba67d20b7c
2 changed files with 14 additions and 0 deletions

View File

@ -2858,6 +2858,7 @@ impl<'a> Reader<'a> {
self.force_exec_prompt_and_repaint = true;
self.input_data
.queue_char(CharEvent::from_readline(ReadlineCmd::Repaint));
self.save_screen_state();
return;
}
@ -2880,6 +2881,7 @@ impl<'a> Reader<'a> {
self.force_exec_prompt_and_repaint = true;
self.input_data
.queue_char(CharEvent::from_readline(ReadlineCmd::Repaint));
self.save_screen_state();
return;
}

View File

@ -33,3 +33,15 @@ isolated-tmux send-keys -X previous-prompt
tmux-sleep
isolated-tmux display-message -p '#{copy_cursor_y} #{copy_cursor_line}'
# CHECK: {{[46]}} prompt-line-1
# Test that the prevd binding does not break the prompt.
isolated-tmux send-keys Escape
tmux-sleep
isolated-tmux send-keys M-left
tmux-sleep
isolated-tmux capture-pane -p | tail -n 5
# CHECK: prompt-line-2> : 5
# CHECK: prompt-line-1
# CHECK: prompt-line-2>
# CHECK:
# CHECK: