On 4/9/18 10:51 AM, Koichi Murase wrote:

> Bash Version: 4.4
> Patch Level: 19
> Release Status: release
> 
> Description:
> 
>   Currently `READLINE_POINT' counts the number of bytes but not
> characters. This makes difficult to properly implement shell functions
> for `bind -x' that uses `READLINE_POINT'. In fact, almost all the
> implementations of `bind -x' functions which can be found in the
> internet is broken for this point.

Because the underlying readline variable that it controls, rl_point, is
kept in bytes -- an index into the line buffer. If you change this, it
will set the point to the wrong place in the buffer (exposed to that
function as READLINE_LINE).

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

Reply via email to