mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00: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:
parent
3a02a3bd6c
commit
ba67d20b7c
2 changed files with 14 additions and 0 deletions
|
@ -2858,6 +2858,7 @@ impl<'a> Reader<'a> {
|
||||||
self.force_exec_prompt_and_repaint = true;
|
self.force_exec_prompt_and_repaint = true;
|
||||||
self.input_data
|
self.input_data
|
||||||
.queue_char(CharEvent::from_readline(ReadlineCmd::Repaint));
|
.queue_char(CharEvent::from_readline(ReadlineCmd::Repaint));
|
||||||
|
self.save_screen_state();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2880,6 +2881,7 @@ impl<'a> Reader<'a> {
|
||||||
self.force_exec_prompt_and_repaint = true;
|
self.force_exec_prompt_and_repaint = true;
|
||||||
self.input_data
|
self.input_data
|
||||||
.queue_char(CharEvent::from_readline(ReadlineCmd::Repaint));
|
.queue_char(CharEvent::from_readline(ReadlineCmd::Repaint));
|
||||||
|
self.save_screen_state();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,3 +33,15 @@ isolated-tmux send-keys -X previous-prompt
|
||||||
tmux-sleep
|
tmux-sleep
|
||||||
isolated-tmux display-message -p '#{copy_cursor_y} #{copy_cursor_line}'
|
isolated-tmux display-message -p '#{copy_cursor_y} #{copy_cursor_line}'
|
||||||
# CHECK: {{[46]}} prompt-line-1
|
# 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:
|
||||||
|
|
Loading…
Reference in a new issue