mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 18:21:16 -03: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:
@@ -463,7 +463,9 @@ fn paste_is_buffering(&self) -> bool {
|
|||||||
}
|
}
|
||||||
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))
|
||||||
|
|||||||
Reference in New Issue
Block a user