From 4afe923945f790998634f731d74d4217c7da3be0 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Tue, 14 Sep 2021 19:00:48 +0300 Subject: [PATCH] src: Make `g` and `v` case sensitive The current implementation allows users to declare mappings in the `goto` and `view` modes with uppercase letters, but doesn't consider case to be meaningful. This quirk is also inconsistent as hitting an unmapped key will quit the mode menu without complaints, but hitting a key that isn't in it will work if it has a lowercase mapping equivalent. Fixes #3976 --- src/normal.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/normal.cc b/src/normal.cc index cba92d0e..47b27008 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -228,7 +228,7 @@ void goto_commands(Context& context, NormalParams params) if (not cp or key == Key::Escape) return; auto& buffer = context.buffer(); - switch (to_lower(*cp)) + switch (*cp) { case 'g': case 'k': @@ -363,7 +363,7 @@ void view_commands(Context& context, NormalParams params) const BufferCoord cursor = context.selections().main().cursor(); Window& window = context.window(); - switch (to_lower(*cp)) + switch (*cp) { case 'v': case 'c':