fix shift-insert for paste on linux
the match guard was applying to both arms, so break this into two separate matches
This commit is contained in:
1 parent
273b903222
commit
b448cfec4d
1 file changed
+14
-9
@@ -735,6 +735,18 @@ impl TerminalState {
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! paste {
|
||||
() => {{
|
||||
let clip = host.get_clipboard()?;
|
||||
if self.bracketed_paste {
|
||||
write!(buf, "\x1b[200~{}\x1b[201~", clip)?;
|
||||
} else {
|
||||
buf = clip;
|
||||
}
|
||||
buf.as_str()
|
||||
}};
|
||||
}
|
||||
|
||||
let to_send = match (key, ctrl, alt, shift, self.application_cursor_keys) {
|
||||
(Char('\n'), _, ALT, ..) => {
|
||||
host.toggle_full_screen();
|
||||
@@ -747,15 +759,8 @@ impl TerminalState {
|
||||
// Delete
|
||||
(Char('\x7f'), _, _, _, false) | (Delete, _, _, _, false) => "\x7f",
|
||||
(Char('\x7f'), ..) | (Delete, ..) => "\x1b[3~",
|
||||
(Insert, _, _, SHIFT, _) | (Char('v'), ..) if mods == KeyModifiers::SUPER => {
|
||||
let clip = host.get_clipboard()?;
|
||||
if self.bracketed_paste {
|
||||
write!(buf, "\x1b[200~{}\x1b[201~", clip)?;
|
||||
} else {
|
||||
buf = clip;
|
||||
}
|
||||
buf.as_str()
|
||||
}
|
||||
(Insert, _, _, SHIFT, _) => paste!(),
|
||||
(Char('v'), ..) if mods == KeyModifiers::SUPER => paste!(),
|
||||
|
||||
(Char(c), CTRL, _, SHIFT, _) if c <= 0xff as char && c > 0x40 as char => {
|
||||
// If shift is held we have C == 0x43 and want to translate
|
||||
|
||||
Reference in new issue
Block a user