bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug: 'vi-fword' binding command does the same as 'vi-fWord'


From: Chet Ramey
Subject: Re: bug: 'vi-fword' binding command does the same as 'vi-fWord'
Date: Wed, 1 Jan 2020 14:15:54 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.3.1

On 12/29/19 8:31 PM, Andrey Butirsky wrote:
> On 30.12.2019 04:26, Chet Ramey wrote:
>> That's the thing: it's not a bug. Function name matching is
>> case-insensitive, and always has been. This goes back as far as I can easily
>> check right now, and even predates vi mode.
>>
> So how about my second suggestion then, to eliminate the confusion?
> 
> Swap
> { "vi-bword", rl_vi_bword },
> to
> { "vi-bword", rl_vi_bWord },

A couple of things. One, that would be wrong, since you want "vi-bWord" to
map to `rl_vi_bWord' and "vi-bword" to map to `rl_vi_bword' for
consistency if nothing else. Two, how would that `eliminate the confusion'?
The result might be what you want, but it would change the behavior for
everyone who wants the historical behavior, breaking backwards
compatibility and introducing additional issues.

The right fix is to use

                vi-forward-word
                vi-forward-bigword
                vi-backward-word
                vi-backward-bigword
                vi-end-word
                vi-end-bigword

since those new bindings were introduced to remove the ambiguity of case-
insensitive matching.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]