mirror of
https://github.com/wez/wezterm.git
synced 2024-09-21 03:39:16 +03:00
lineedit: add ctrl-L repaint/refresh binding
This commit is contained in:
parent
90fece7b27
commit
8a74eff72e
@ -27,6 +27,7 @@
|
||||
//! Ctrl-F, Right | Move cursor one grapheme to the right
|
||||
//! Ctrl-H, Backspace | Delete the grapheme to the left of the cursor
|
||||
//! Ctrl-J, Ctrl-M, Enter | Finish line editing and accept the current line
|
||||
//! Ctrl-L | Move the cursor to the top left, clear screen and repaint
|
||||
use crate::caps::{Capabilities, ProbeHintsBuilder};
|
||||
use crate::input::{InputEvent, KeyCode, KeyEvent, Modifiers};
|
||||
use crate::surface::{Change, Position};
|
||||
@ -221,6 +222,13 @@ impl<T: Terminal> LineEditor<T> {
|
||||
self.line.insert_str(self.cursor, &text);
|
||||
self.cursor += text.len();
|
||||
}
|
||||
InputEvent::Key(KeyEvent {
|
||||
key: KeyCode::Char('L'),
|
||||
modifiers: Modifiers::CTRL,
|
||||
}) => {
|
||||
self.terminal
|
||||
.render(&[Change::ClearScreen(Default::default())])?;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
self.render()?;
|
||||
|
Loading…
Reference in New Issue
Block a user