From 811f1c2d761855765bb5422281058debc58073ba Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 25 May 2014 17:41:28 +0100 Subject: Rename Key::Erase to Key::Delete and add 'del' keyname Fixes #145 Fixes #146 --- src/input_handler.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/input_handler.cc') diff --git a/src/input_handler.cc b/src/input_handler.cc index f12a8854..bf363d69 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -138,7 +138,7 @@ public: --m_cursor_pos; } } - else if (key == Key::Erase) + else if (key == Key::Delete) { if (m_cursor_pos != m_line.char_length()) m_line = m_line.substr(0, m_cursor_pos) @@ -675,7 +675,7 @@ public: buffer.erase(utf8::previous(pos), pos); } } - else if (key == Key::Erase) + else if (key == Key::Delete) { for (auto& sel : context().selections()) { -- cgit v1.2.3 From bf50a1c191bbd23194cc3410c068213c04dba2cf Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 25 May 2014 19:14:44 +0100 Subject: In normal mode, backspace can be used to edit count Fix #125 --- src/input_handler.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/input_handler.cc') diff --git a/src/input_handler.cc b/src/input_handler.cc index bf363d69..523a1660 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -84,6 +84,8 @@ public: { if (key.modifiers == Key::Modifiers::None and isdigit(key.key)) m_count = m_count * 10 + key.key - '0'; + else if (key == Key::Backspace) + m_count /= 10; else { auto it = keymap.find(key); -- cgit v1.2.3