diff --git a/src/commands.cc b/src/commands.cc index fbedc529..e66c043e 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -1816,7 +1816,7 @@ const CommandDesc map_key_cmd = { throw runtime_error("only a single key can be mapped"); 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)) throw runtime_error("mode only supports lower case mappings"); diff --git a/test/regression/4521-alt-mapping-broken-in-lower-case-modes/cmd b/test/regression/4521-alt-mapping-broken-in-lower-case-modes/cmd new file mode 100644 index 00000000..ca1112b5 --- /dev/null +++ b/test/regression/4521-alt-mapping-broken-in-lower-case-modes/cmd @@ -0,0 +1 @@ +gd diff --git a/test/regression/4521-alt-mapping-broken-in-lower-case-modes/in b/test/regression/4521-alt-mapping-broken-in-lower-case-modes/in new file mode 100644 index 00000000..257cc564 --- /dev/null +++ b/test/regression/4521-alt-mapping-broken-in-lower-case-modes/in @@ -0,0 +1 @@ +foo diff --git a/test/regression/4521-alt-mapping-broken-in-lower-case-modes/out b/test/regression/4521-alt-mapping-broken-in-lower-case-modes/out new file mode 100644 index 00000000..56a2a5ae --- /dev/null +++ b/test/regression/4521-alt-mapping-broken-in-lower-case-modes/out @@ -0,0 +1 @@ +fo diff --git a/test/regression/4521-alt-mapping-broken-in-lower-case-modes/rc b/test/regression/4521-alt-mapping-broken-in-lower-case-modes/rc new file mode 100644 index 00000000..95c82b04 --- /dev/null +++ b/test/regression/4521-alt-mapping-broken-in-lower-case-modes/rc @@ -0,0 +1 @@ +map global goto l