mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-04 07:21:14 -03:00
Refresh TTY timestamps after nextd/prevd
This fixes a macOS-specific bug. See390b40e02(Fix regression not refreshing TTY timestamps after external command from binding, 2024-05-29) and8a7c3ceec(Don't abandon line after writing control sequences, 2024-04-06). Fixes #10779
This commit is contained in:
@@ -2858,6 +2858,7 @@ fn handle_readline_command(&mut self, c: ReadlineCmd) {
|
||||
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 @@ fn handle_readline_command(&mut self, c: ReadlineCmd) {
|
||||
self.force_exec_prompt_and_repaint = true;
|
||||
self.input_data
|
||||
.queue_char(CharEvent::from_readline(ReadlineCmd::Repaint));
|
||||
self.save_screen_state();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user