1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-25 04:24:48 +03:00

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
This commit is contained in:
Frank LENORMAND 2021-09-14 19:00:48 +03:00
parent b3a1017a26
commit 4afe923945

View File

@ -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':