bug-readline
[Top][All Lists]
Advanced

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

[Bug-readline] [RFA] Merge fix for mingw support for Home, End, Insert a


From: Pierre Muller
Subject: [Bug-readline] [RFA] Merge fix for mingw support for Home, End, Insert and Delete keys inot gdb readline
Date: Tue, 24 Sep 2013 08:25:08 +0200

  This patch that I submitted in December last year
was integrated by Chet Ramey into the development branch of
the bash git repository.

  The patch below integrates this accepted patch into gdb readline.


OK to commit?
I am unsure about how to state inside the ChangeLog
that this patch is already inside the development branch of readline main
sources.




2013-09-24  Pierre Muller  <address@hidden>

        Merge patch accepted in bash development branch.
        * src/readline/readline.c (bind_arrow_keys_internal):
        Handle VK_HOME, VK_END, VK_DELETE and VK_INSERT for mingw
        hosts.

Index: src/readline/readline.c
===================================================================
RCS file: /cvs/src/src/readline/readline.c,v
retrieving revision 1.11
diff -u -p -r1.11 readline.c
--- src/readline/readline.c     11 May 2011 23:38:39 -0000      1.11
+++ src/readline/readline.c     24 Sep 2013 06:11:46 -0000
@@ -1159,6 +1159,10 @@ bind_arrow_keys_internal (map)
   rl_bind_keyseq_if_unbound ("\340P", rl_get_next_history);
   rl_bind_keyseq_if_unbound ("\340M", rl_forward_char);
   rl_bind_keyseq_if_unbound ("\340K", rl_backward_char);
+  rl_bind_keyseq_if_unbound ("\340G", rl_beg_of_line);
+  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);
 #endif
 
   _rl_keymap = xkeymap;

> -----Message d'origine-----
> De : address@hidden [mailto:gdb-patches-
> address@hidden De la part de Pierre Muller
> Envoyé : vendredi 14 décembre 2012 09:37
> À : address@hidden
> Cc : address@hidden; 'Eli Zaretskii'; 'Tom Tromey'
> Objet : Fix mingw support for Home,End,Insert and Delete keys
> 
>   The following patch fixes some non-working keys
> for mingw32, when used without ncurses.
> 
>   It doesn't fix the problem of the numeric keypad uses
> with NumKey Off...
> Because those generate a prefix with code 0x0,
> but as readline uses zero terminated string for key sequences...
> I don't know how I could handle those correctly!
> 
> 
> 
> 
> Pierre Muller
> GDB pascal language support maintainer
> 
> 2012-12-10  Pierre Muller  <address@hidden>
> 
>         * readline.c (bind_arrow_keys_internal): Add missing handling of
>         VK_HOME, VK_END, VK_DELETE and VK_INSERT for mingw hosts.
> 
> 
> $ git diff -u -p readline.c
> diff --git a/readline.c b/readline.c
> index f2e4d93..abb09d1 100644
> --- a/readline.c
> +++ b/readline.c
> @@ -1155,10 +1155,24 @@ bind_arrow_keys_internal (map)
>    rl_bind_keyseq_if_unbound ("\033OF", rl_end_of_line);
> 
>  #if defined (__MINGW32__)
> +  /* Handle Windows OS special keys sent as 0xe0 followed
> +     by keycode.  */
> +  /* Handles VK_UP keycode.  */
>    rl_bind_keyseq_if_unbound ("\340H", rl_get_previous_history);
> +  /* Handles VK_DOWN keycode.  */
>    rl_bind_keyseq_if_unbound ("\340P", rl_get_next_history);
> +  /* Handles VK_RIGHT keycode.  */
>    rl_bind_keyseq_if_unbound ("\340M", rl_forward_char);
> +  /* Handles VK_LEFT keycode.  */
>    rl_bind_keyseq_if_unbound ("\340K", rl_backward_char);
> +  /* Handles VK_HOME keycode.  */
> +  rl_bind_keyseq_if_unbound ("\340G", rl_beg_of_line);
> +  /* Handles VK_END keycode.  */
> +  rl_bind_keyseq_if_unbound ("\340O", rl_end_of_line);
> +  /* Handles VK_DELETE keycode.  */
> +  rl_bind_keyseq_if_unbound ("\340S", rl_delete);
> +  /* Handles VK_INSERT keycode.  */
> +  rl_bind_keyseq_if_unbound ("\340R", rl_overwrite_mode);
>  #endif
> 
>    _rl_keymap = xkeymap;



reply via email to

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