bug-readline
[Top][All Lists]
Advanced

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

Re: [Bug-readline] rl_dispatch_callback matches wrong key sequence while


From: Chet Ramey
Subject: Re: [Bug-readline] rl_dispatch_callback matches wrong key sequence while one is prefix of another one
Date: Mon, 10 Aug 2009 15:28:57 -0400
User-agent: Thunderbird 2.0.0.22 (Macintosh/20090605)

freehaha wrote:
> infos:
> tested rl version: 5.2, 6
> OS: Ubuntu Hardy, Debian Sid
> 
> key sequence matching in callback functions fails when a
> 2-letters-shorter key seq is defined
> the attached "rltest.c" demostrates it.
> 
> I think it's a bug in rl_dispatch_callback and hacked it (only one line
> though).
> the patch is attached, hope that it helps. It's a great library :)

Thanks for the patch.  It looks right.

> --------------
> another things which i consider a bug is that while user hava an
> .inputrc setting editing mode to vi,
> readline automatically sets the working keymap to vi_insertion_keymap in
> the initialization sequence.

This is just how bash/readline line editing works.  Readline ensures
that editing starts with the vi insertion keymap when in vi mode.  This
is what Posix specifies, for instance.

Setting a custom keymap is a good use of the input hook.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

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