mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-19 14:51:13 -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) {
|
||||
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!(
|
||||
"__fish_paste %s",
|
||||
escape(&str2wcstring(&buffer))
|
||||
|
||||
Reference in New Issue
Block a user