diff options
author | Kazu Hirata <kazu@codesourcery.com> | 2006-07-23 22:22:49 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@codesourcery.com> | 2006-07-23 22:22:49 +0000 |
commit | fc468d8235102ec26340c840a213680d3b4b5935 (patch) | |
tree | 42d8f4154ca5b34f0b77157caf33046395c6e1cb | |
parent | bc42de23cde5f30872500902bf61ecd53e012e1d (diff) | |
download | fsf-binutils-gdb-fc468d8235102ec26340c840a213680d3b4b5935.zip fsf-binutils-gdb-fc468d8235102ec26340c840a213680d3b4b5935.tar.gz fsf-binutils-gdb-fc468d8235102ec26340c840a213680d3b4b5935.tar.bz2 |
readline/
Backport from mainline:
* emacs_keymap.c: Add a MINGW32 hack.
* readline.c: Use _rl_bind_if_unbound to avoid macro bugs.
-rw-r--r-- | ChangeLog.csl | 7 | ||||
-rw-r--r-- | readline/emacs_keymap.c | 4 | ||||
-rw-r--r-- | readline/readline.c | 17 |
3 files changed, 15 insertions, 13 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl index 2f67cc0..9813b70 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,10 @@ +2006-07-23 Kazu Hirata <kazu@codesourcery.com> + + readline/ + Backport from mainline: + * emacs_keymap.c: Add a MINGW32 hack. + * readline.c: Use _rl_bind_if_unbound to avoid macro bugs. + 2006-07-18 Nathan Sidwell <nathan@codesourcery.com> gdb/ diff --git a/readline/emacs_keymap.c b/readline/emacs_keymap.c index ca9d134..cbacb03 100644 --- a/readline/emacs_keymap.c +++ b/readline/emacs_keymap.c @@ -278,7 +278,11 @@ KEYMAP_ENTRY_ARRAY emacs_standard_keymap = { { ISFUNC, rl_insert }, /* Latin capital letter Y with acute */ { ISFUNC, rl_insert }, /* Latin capital letter thorn (Icelandic) */ { ISFUNC, rl_insert }, /* Latin small letter sharp s (German) */ +#ifndef __MINGW32__ { ISFUNC, rl_insert }, /* Latin small letter a with grave */ +#else + { ISFUNC, 0 }, /* Must leave this unbound for the arrow keys to work. */ +#endif { ISFUNC, rl_insert }, /* Latin small letter a with acute */ { ISFUNC, rl_insert }, /* Latin small letter a with circumflex */ { ISFUNC, rl_insert }, /* Latin small letter a with tilde */ diff --git a/readline/readline.c b/readline/readline.c index 07fb58f..3ba5cf0 100644 --- a/readline/readline.c +++ b/readline/readline.c @@ -869,19 +869,10 @@ bind_arrow_keys_internal (map) #endif #ifdef __MINGW32__ - /* Under Windows, when an extend key (like an arrow key) is - pressed, getch() will return 340 (octal) followed by a code for - the extended key. We use macros to transform those into the - normal ANSI terminal sequences for these keys. */ - - /* Up arrow. */ - rl_macro_bind ("\340H", "\033[A", map); - /* Left arrow. */ - rl_macro_bind ("\340K", "\033[D", map); - /* Right arrow. */ - rl_macro_bind ("\340M", "\033[C", map); - /* Down arrow. */ - rl_macro_bind ("\340P", "\033[B", map); + _rl_bind_if_unbound ("\340H", rl_get_previous_history); + _rl_bind_if_unbound ("\340P", rl_get_next_history); + _rl_bind_if_unbound ("\340M", rl_forward_char); + _rl_bind_if_unbound ("\340K", rl_backward_char); #endif _rl_bind_if_unbound ("\033[A", rl_get_previous_history); |