diff options
| author | Igor Ramazanov <igor.ramazanov@protonmail.com> | 2025-02-12 23:46:00 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-12 23:46:00 +0000 |
| commit | b548d7c2b9c0e90249e956bbfdd78ff5fad3c2d5 (patch) | |
| tree | 097a077c569078e372abd6ddf596e56cf143c7ef /src/input_handler.cc | |
| parent | ce4dc805e375dbd8c0477ad5005c2110f83de2aa (diff) | |
| parent | 0a4bea856fe6ddd6420d6d7141b20eed8fe0bd25 (diff) | |
Merge branch 'mawww:master' into contrib/gendocs.sh
Diffstat (limited to 'src/input_handler.cc')
| -rw-r--r-- | src/input_handler.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc index 0f2c8987..ea803217 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -764,15 +764,17 @@ public: on_next_key_with_autoinfo(context(), "register", KeymapMode::None, [this](Key key, Context&) { const bool joined = (bool)(key.modifiers & Key::Modifiers::Alt); - key.modifiers &= ~Key::Modifiers::Alt; + const bool quoted = (bool)(key.modifiers & Key::Modifiers::Control); + key.modifiers &= ~(Key::Modifiers::Alt | Key::Modifiers::Control); auto cp = key.codepoint(); if (not cp or key == Key::Escape) return; + auto* quoter = Kakoune::quoter(quoted ? Quoting::Kakoune : Quoting::Raw); m_line_editor.insert( - joined ? join(RegisterManager::instance()[*cp].get(context()), ' ', false) - : context().main_sel_register_value(String{*cp})); + joined ? join(RegisterManager::instance()[*cp].get(context()) | transform(quoter), ' ', false) + : quoter(context().main_sel_register_value(String{*cp}))); display(); m_line_changed = true; |
