[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: |
Davor Cubranic |
Subject: |
Re: [Bug-readline] Cannot use M-<key> bindings in incremental search |
Date: |
Sat, 28 Aug 2010 22:03:02 -0700 |
User-agent: |
KMail/1.13.2 (Linux/2.6.32-24-generic; KDE/4.4.2; i686; ; ) |
On August 28, 2010 04:55:41 pm you wrote:
> > 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.
How about doing this check only if 'key' is not in 'isearch-
terminators'? I should have added that I removed ESC from my list of
terminators, precisely for this reason.
Or, even better, move the isearch-terminators check as early as
possible. Right now, it doesn't look like a few special characters (C-
G/W/Y) will work as they're treated specially around lines 350-355, and
the terminator check is at line 362. That way, the whole customization
works more consistently, and no keys are treated specially.
Thanks,
Davor