mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
input: Fix crash for weird bracketed paste
I can reproduce by pasting after ```fish echo \cc foo | fish_clipboard_copy ``` in Wezterm
This commit is contained in:
parent
cb58a30bf2
commit
e8eb4822ce
1 changed files with 3 additions and 1 deletions
|
@ -463,7 +463,9 @@ impl InputEventQueuer for Inputter {
|
||||||
}
|
}
|
||||||
fn paste_commit(&mut self) {
|
fn paste_commit(&mut self) {
|
||||||
self.push_front(CharEvent::from_readline(ReadlineCmd::EndUndoGroup));
|
self.push_front(CharEvent::from_readline(ReadlineCmd::EndUndoGroup));
|
||||||
let buffer = self.paste_buffer.take().unwrap();
|
let Some(buffer) = self.paste_buffer.take() else {
|
||||||
|
return;
|
||||||
|
};
|
||||||
self.push_front(CharEvent::Command(sprintf!(
|
self.push_front(CharEvent::Command(sprintf!(
|
||||||
"__fish_paste %s",
|
"__fish_paste %s",
|
||||||
escape(&str2wcstring(&buffer))
|
escape(&str2wcstring(&buffer))
|
||||||
|
|
Loading…
Reference in a new issue