diff options
| author | Maxime Coste <mawww@kakoune.org> | 2023-03-13 20:55:31 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2023-03-13 20:55:31 +1100 |
| commit | 6548846950598f9173f254fcdf31326aac02bb4f (patch) | |
| tree | 096d1f8cf6c8ef731722491d9310511f4ba076d9 /src/input_handler.cc | |
| parent | f05ab99d4d7322055f7eb9b9d86b529062885208 (diff) | |
Slight refactoring of bracketed paste feature
Handle begin/end paste directly in paste csi, manage paste buffer
out of get_char, filter Key::Invalid earlier.
get_next_key returning Key::Invalid means there was some input but
it could not be represented as a Key. An empty optional means there
was no input at all.
Diffstat (limited to 'src/input_handler.cc')
| -rw-r--r-- | src/input_handler.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc index 877517e2..97db92c6 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -1750,8 +1750,7 @@ static bool is_valid(Key key) { constexpr Key::Modifiers valid_mods = (Key::Modifiers::Control | Key::Modifiers::Alt | Key::Modifiers::Shift); - return key != Key::Invalid and - ((key.modifiers & ~valid_mods) or key.key <= 0x10FFFF); + return ((key.modifiers & ~valid_mods) or key.key <= 0x10FFFF); } void InputHandler::handle_key(Key key) |
