Fix modified keys not being mappable in goto mode

The test was invalid, non-codepoint keys should be considered mappable.

Fixes #4521
This commit is contained in:
Maxime Coste 2022-02-01 13:36:36 +11:00
parent d44d07bd80
commit 4bd34caf4f
5 changed files with 5 additions and 1 deletions

View File

@ -1816,7 +1816,7 @@ const CommandDesc map_key_cmd = {
throw runtime_error("only a single key can be mapped"); throw runtime_error("only a single key can be mapped");
KeymapMode lower_case_only_modes[] = {KeymapMode::Goto}; KeymapMode lower_case_only_modes[] = {KeymapMode::Goto};
if (key[0].codepoint().map(iswupper).value_or(true) and if (key[0].codepoint().map(iswupper).value_or(false) and
contains(lower_case_only_modes, keymap_mode)) contains(lower_case_only_modes, keymap_mode))
throw runtime_error("mode only supports lower case mappings"); throw runtime_error("mode only supports lower case mappings");

View File

@ -0,0 +1 @@
g<a-X>d

View File

@ -0,0 +1 @@
foo

View File

@ -0,0 +1 @@
fo

View File

@ -0,0 +1 @@
map global goto <a-X> l