mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-20 01:25:17 +08:00
Fix assertion error in when scrollback-push is enqueued from script
Some checks are pending
make test / ubuntu (push) Waiting to run
make test / ubuntu-32bit-static-pcre2 (push) Waiting to run
make test / ubuntu-asan (push) Waiting to run
make test / macos (push) Waiting to run
Rust checks / rustfmt (push) Waiting to run
Rust checks / clippy (push) Waiting to run
Some checks are pending
make test / ubuntu (push) Waiting to run
make test / ubuntu-32bit-static-pcre2 (push) Waiting to run
make test / ubuntu-asan (push) Waiting to run
make test / macos (push) Waiting to run
Rust checks / rustfmt (push) Waiting to run
Rust checks / clippy (push) Waiting to run
As soon as we start processing a scrollback-push readline command, we pause execution of all other readline commands until scrollback-push retires. This means that we never get into a situation with two active scrollback-push commands -- unless we are executing readline commands via a script running "commandline -f": since the first part of scrollback-push handling returns immediately, the script will proceed before scrollback-push retires. A second scrollback-push fails an assertion. Work around that for now. In future, scrollback-push should block when invoked by such a script, just like it does when invoked from bindings.
This commit is contained in:
parent
8910390602
commit
13763fa318
@ -3508,6 +3508,10 @@ impl<'a> Reader<'a> {
|
||||
self.parser.libdata_mut().is_repaint = false;
|
||||
}
|
||||
rl::ScrollbackPush => {
|
||||
if self.waiting_for_cursor_position.is_some() {
|
||||
// TODO: re-queue it I guess.
|
||||
return;
|
||||
}
|
||||
self.request_cursor_position(WaitingForCursorPosition::ScrollbackPush);
|
||||
}
|
||||
rl::SelfInsert | rl::SelfInsertNotFirst | rl::FuncAnd | rl::FuncOr => {
|
||||
|
8
tests/checks/tmux-scrollback.fish
Normal file
8
tests/checks/tmux-scrollback.fish
Normal file
@ -0,0 +1,8 @@
|
||||
#RUN: %fish %s
|
||||
#REQUIRES: command -v tmux
|
||||
|
||||
isolated-tmux-start
|
||||
isolated-tmux send-keys 'bind ctrl-g "commandline -f scrollback-push scrollback-push"' Enter C-g
|
||||
tmux-sleep
|
||||
isolated-tmux capture-pane -p
|
||||
# CHECK: prompt 1>
|
Loading…
x
Reference in New Issue
Block a user