[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-readline] Cannot use M-<key> bindings in incremental search
From: |
Chet Ramey |
Subject: |
Re: [Bug-readline] Cannot use M-<key> bindings in incremental search |
Date: |
Sat, 28 Aug 2010 19:55:41 -0400 |
> If I bind incremental search to a M-<key>, and start the search,
> Readline does not interpret correctly subsequent presses of the key.
> Instead of showing the next match, what happens is that the search is
> restarted, with the search string reset to empty.
>
> My .inputrc:
>
> "\es": reverse-search-history # Meta-s
> "\eS": forward-search-history # Meta-S
>
> Could this be because the lookup of the key in _rl_isearch_dispatch
> (isearch.c:340) does not match for bindings involving Meta because the
> input character 'c' does not map to an ISFUNC in the current _rl_keymap?
It is, but changing this is a problem. I can easily modify the code so
that it handles keymap[key].type == ISKMAP and behaves appropriately, but
it introduces an incompatibility. ESC is one of the characters that
terminates an incremental search; making this change will break that. I'm
reluctant to change the behavior as a result.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/