fix(compatibility): properly paste multilines (#653)

* fix(compatibility): properly paste multilines

* test(input): fix bracketed paste assertion
This commit is contained in:
Aram Drevekenin 2021-08-20 16:54:18 +02:00 committed by GitHub
parent a4e6e89a76
commit 643b7df35c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -91,8 +91,10 @@ impl InputHandler {
self.handle_key(&key, raw_bytes);
} else if unsupported_key == bracketed_paste_start {
self.pasting = true;
self.handle_unknown_key(raw_bytes);
} else if unsupported_key == bracketed_paste_end {
self.pasting = false;
self.handle_unknown_key(raw_bytes);
} else {
// this is a hack because termion doesn't recognize certain keys
// in this case we just forward it to the terminal

View file

@ -259,7 +259,9 @@ pub fn bracketed_paste() {
default_mode,
));
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::BRACKETED_PASTE_END.to_vec()),
Action::Quit,
];
let received_actions = extract_actions_sent_to_server(events_sent_to_server);