From 6484fead0cae74ca2e1eb5a73be3fa1e5f17cece Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 2 Jul 2013 14:03:20 +0100 Subject: replace with char only replaces when entered character is printable --- src/normal.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/normal.cc') diff --git a/src/normal.cc b/src/normal.cc index 91aedfeb..45cc8638 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -201,6 +201,8 @@ void view_commands(Context& context) void replace_with_char(Context& context) { context.input_handler().on_next_key([](const Key& key, Context& context) { + if (not isprint(key.key)) + return; Editor& editor = context.editor(); SelectionList sels = editor.selections(); auto restore_sels = on_scope_end([&]{ editor.select(std::move(sels)); }); -- cgit v1.2.3