[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-readline] [PING] Fix mingw support for Home, End, Insert and De
From: |
Pierre Muller |
Subject: |
Re: [Bug-readline] [PING] Fix mingw support for Home, End, Insert and Delete keys |
Date: |
Tue, 24 Sep 2013 22:35:36 +0200 |
Hi Chet,
the patch I sent previously was against gdb readline before
the previous patch was merged.
Here is a diff to bash git repository origin/devel branch.
It should apply more easily.
Pierre Muller
GDB pascal language maintainer
2013-09-24 Pierre Muller <address@hidden>
* readline.c (bind_arrow_keys_internal): Support
the numeric keypad arrow keys for mingw hosts.
Index: src/readline/readline.c
===================================================================
RCS file: /cvs/src/src/readline/readline.c,v
retrieving revision 1.12
diff -u -p -r1.12 readline.c
--- src/readline/readline.c 24 Sep 2013 14:49:48 -0000 1.12
+++ src/readline/readline.c 24 Sep 2013 15:00:02 -0000
@@ -1163,6 +1163,14 @@ bind_arrow_keys_internal (map)
rl_bind_keyseq_if_unbound ("\340O", rl_end_of_line);
rl_bind_keyseq_if_unbound ("\340S", rl_delete);
rl_bind_keyseq_if_unbound ("\340R", rl_overwrite_mode);
+ rl_bind_keyseq_if_unbound ("\\000H", rl_get_previous_history);
+ rl_bind_keyseq_if_unbound ("\\000P", rl_get_next_history);
+ rl_bind_keyseq_if_unbound ("\\000M", rl_forward_char);
+ rl_bind_keyseq_if_unbound ("\\000K", rl_backward_char);
+ rl_bind_keyseq_if_unbound ("\\000G", rl_beg_of_line);
+ rl_bind_keyseq_if_unbound ("\\000O", rl_end_of_line);
+ rl_bind_keyseq_if_unbound ("\\000S", rl_delete);
+ rl_bind_keyseq_if_unbound ("\\000R", rl_overwrite_mode);
#endif
_rl_keymap = xkeymap;
> -----Message d'origine-----
> De : Chet Ramey [mailto:address@hidden
> Envoyé : mardi 24 septembre 2013 16:03
> À : Pierre Muller
> Cc : address@hidden; 'Joel Brobecker'; address@hidden
> Objet : Re: [Bug-readline] [PING] Fix mingw support for Home, End, Insert
> and Delete keys
>
> On 9/24/13 5:36 AM, Pierre Muller wrote:
> > Hi Chet,
> >
> > finally it is much easier than
> > what I expected...
> >
> > We can simply use the fact that
> > the key sequence can be encoded as rl_translate_key
> > returns a char array and a length of this array,
> > thus the '\0' value is not a problem anymore.
> > Thus using "\\000P" as a key sequence works like a charm!
> > See the patch below.
> >
> >
> > Can this also be integrated in readline development?
>
> Sure. We will see how successful it is in the places where readline uses
> the key sequence as a string.
>
> 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/
- Re: [Bug-readline] [PING] Fix mingw support for Home, End, Insert and Delete keys, Chet Ramey, 2013/09/22
- Re: [Bug-readline] [PING] Fix mingw support for Home, End, Insert and Delete keys, Pierre Muller, 2013/09/22
- Message not available
- Re: [Bug-readline] [PING] Fix mingw support for Home, End, Insert and Delete keys, Chet Ramey, 2013/09/23
- Re: [Bug-readline] [PING] Fix mingw support for Home, End, Insert and Delete keys, Pierre Muller, 2013/09/24
- Message not available
- Re: [Bug-readline] [PING] Fix mingw support for Home, End, Insert and Delete keys, Chet Ramey, 2013/09/24
- Re: [Bug-readline] [PING] Fix mingw support for Home, End, Insert and Delete keys,
Pierre Muller <=