fix(compatibility): properly paste multilines (#653)
* fix(compatibility): properly paste multilines * test(input): fix bracketed paste assertion
This commit is contained in:
parent
a4e6e89a76
commit
643b7df35c
2 changed files with 4 additions and 0 deletions
|
|
@ -91,8 +91,10 @@ impl InputHandler {
|
||||||
self.handle_key(&key, raw_bytes);
|
self.handle_key(&key, raw_bytes);
|
||||||
} else if unsupported_key == bracketed_paste_start {
|
} else if unsupported_key == bracketed_paste_start {
|
||||||
self.pasting = true;
|
self.pasting = true;
|
||||||
|
self.handle_unknown_key(raw_bytes);
|
||||||
} else if unsupported_key == bracketed_paste_end {
|
} else if unsupported_key == bracketed_paste_end {
|
||||||
self.pasting = false;
|
self.pasting = false;
|
||||||
|
self.handle_unknown_key(raw_bytes);
|
||||||
} else {
|
} else {
|
||||||
// this is a hack because termion doesn't recognize certain keys
|
// this is a hack because termion doesn't recognize certain keys
|
||||||
// in this case we just forward it to the terminal
|
// in this case we just forward it to the terminal
|
||||||
|
|
|
||||||
|
|
@ -259,7 +259,9 @@ pub fn bracketed_paste() {
|
||||||
default_mode,
|
default_mode,
|
||||||
));
|
));
|
||||||
let expected_actions_sent_to_server = vec![
|
let expected_actions_sent_to_server = vec![
|
||||||
|
Action::Write(commands::BRACKETED_PASTE_START.to_vec()),
|
||||||
Action::Write(commands::MOVE_FOCUS_LEFT_IN_NORMAL_MODE.to_vec()), // keys were directly written to server and not interpreted
|
Action::Write(commands::MOVE_FOCUS_LEFT_IN_NORMAL_MODE.to_vec()), // keys were directly written to server and not interpreted
|
||||||
|
Action::Write(commands::BRACKETED_PASTE_END.to_vec()),
|
||||||
Action::Quit,
|
Action::Quit,
|
||||||
];
|
];
|
||||||
let received_actions = extract_actions_sent_to_server(events_sent_to_server);
|
let received_actions = extract_actions_sent_to_server(events_sent_to_server);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue