Hi,

the bug is: if any Readline binding command names differs only in character's case, these commands is indistinguishable and do the same function.

For example, 'vi-fword' binding command erroneously does the same as 'vi-fWord' one, that is - jumps on "big" (space separated) words; while it is alias of||"vi-forward-word" command and as such should jump on a "small" vi words. For 'vi-fWord', "vi-forward-bigword" alias exists:

|http://git.savannah.gnu.org/cgit/readline.git/tree/funmap.c?h=readline-6.3&id=3fede80c7ae9d396a98137ec8e7188a27c327e96#n174 funmap.c:   { "vi-fWord", rl_vi_fWord }, .... { "vi-forward-bigword", rl_vi_fWord }, { "vi-forward-word", rl_vi_fword }, { "vi-fword", rl_vi_fword },|

This occurs due _rl_stricmp() function used to compare names is caseless, and "vi-fWord" name happened to encounter first in the array above:

http://git.savannah.gnu.org/cgit/readline.git/tree/util.c?h=readline-6.3&id=3fede80c7ae9d396a98137ec8e7188a27c327e96#n397

|/* strcmp (), but caseless (strcasecmp). */ int _rl_stricmp (string1, string2) char *string1, *string2; { |

To reproduce:

$ bind '"\eF": vi-fWord'

try it, then

$ bind '"\eF": vi-fword'

See there is no difference in the Meta + F key shortcut - it still jumps over "big" space-delimited words.

Then

$ bind '"\eF": vi-forward-word'

It starts jump on "small" vi words, however - it is alias for "vi-fword".

||

||


Reply via email to