From ac1192f58ac6566f8889d13debdf53b31f1063ed Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 2 Jan 2017 04:03:02 +0000 Subject: [PATCH] Ensure cancels in replace with char After recent changes that associated with the 0x1b codepoint r would replace each char with 0x1b instead of canceling the replace command. --- src/normal.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/normal.cc b/src/normal.cc index e558fcf1..aa1e1174 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -307,7 +307,7 @@ void replace_with_char(Context& context, NormalParams) on_next_key_with_autoinfo(context, KeymapMode::None, [](Key key, Context& context) { auto cp = key.codepoint(); - if (not cp) + if (not cp or key == Key::Escape) return; ScopedEdition edition(context); Buffer& buffer = context.buffer();