mirror of
https://github.com/nushell/reedline.git
synced 2024-08-17 20:00:49 +03:00
fix bracketed paste (#577)
This commit is contained in:
parent
ec002a7ce8
commit
65c4e7a419
@ -156,7 +156,9 @@ impl EditMode for Emacs {
|
||||
Event::Resize(width, height) => ReedlineEvent::Resize(width, height),
|
||||
Event::FocusGained => ReedlineEvent::None,
|
||||
Event::FocusLost => ReedlineEvent::None,
|
||||
Event::Paste(body) => ReedlineEvent::Edit(vec![EditCommand::InsertString(body)]),
|
||||
Event::Paste(body) => ReedlineEvent::Edit(vec![EditCommand::InsertString(
|
||||
body.replace("\r\n", "\n").replace('\r', "\n"),
|
||||
)]),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,9 @@ impl EditMode for Vi {
|
||||
Event::Resize(width, height) => ReedlineEvent::Resize(width, height),
|
||||
Event::FocusGained => ReedlineEvent::None,
|
||||
Event::FocusLost => ReedlineEvent::None,
|
||||
Event::Paste(body) => ReedlineEvent::Edit(vec![EditCommand::InsertString(body)]),
|
||||
Event::Paste(body) => ReedlineEvent::Edit(vec![EditCommand::InsertString(
|
||||
body.replace("\r\n", "\n").replace('\r', "\n"),
|
||||
)]),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user