From 74c3f101cd60e213962026f0bb0235102f7bc833 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 28 Jul 2016 09:24:51 +0100 Subject: [PATCH] Use -1 for invalid codepoint, not 0 --- src/normal.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/normal.cc b/src/normal.cc index 31afeb90..6927c291 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -924,8 +924,8 @@ void select_object(Context& context, NormalParams params) const int level = params.count <= 0 ? 0 : params.count - 1; on_next_key_with_autoinfo(context, KeymapMode::Object, [level](Key key, Context& context) { - auto cp = key.codepoint().value_or(Codepoint{0}); - if (cp == 0) + auto cp = key.codepoint().value_or((Codepoint)-1); + if (cp == -1) return; static constexpr struct