diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index d6e8e0f1..5962116b 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -14847,4 +14847,22 @@ pcomplete.c command, and find any programmable completions for it. Here right now, could be moved to attempt_shell_completion later if we need to do more analysis of the expanded line. We'll see how it works - in practice. + in practice. (Disabled for now.) + + 1/16 + ---- +parse.y + - grammar: when timing the null command, make sure to turn off the + flags in parser_state (PST_REDIRLIST) that make_simple_command sets + when given a NULL second argument, since it assumes that it's going + to turn those off when it gets the next word of the simple command + (which it never gets in this case). Fixes bug reported by + Anti Räis + + 1/19 + ---- +lib/readline/rltty.c + - prepare_terminal_settings (termios/termio): if there is a function + bound to the VDISCARD character in the current keymap, set VDISCARD + to _POSIX_VDISABLE while readline is active. From a report from + Rhialto diff --git a/lib/readline/rltty.c b/lib/readline/rltty.c index 6d777ad8..6d907192 100644 --- a/lib/readline/rltty.c +++ b/lib/readline/rltty.c @@ -503,6 +503,9 @@ set_tty_settings (int tty, TIOTYPE *tiop) static void prepare_terminal_settings (int meta_flag, TIOTYPE oldtio, TIOTYPE *tiop) { + int sc; + Keymap kmap; + _rl_echoing_p = (oldtio.c_lflag & ECHO); #if defined (ECHOCTL) _rl_echoctl = (oldtio.c_lflag & ECHOCTL); @@ -559,6 +562,20 @@ prepare_terminal_settings (int meta_flag, TIOTYPE oldtio, TIOTYPE *tiop) tiop->c_cc[VDSUSP] = _POSIX_VDISABLE; #endif + /* Conditionally disable some other tty special characters if there is a + key binding for them in the current keymap. Readline ordinarily doesn't + bind these characters, but an application or user might. */ +#if defined (VI_MODE) + kmap = (rl_editing_mode == vi_mode) ? vi_insertion_keymap : _rl_keymap; +#else + kmap = _rl_keymap; +#endif +#if defined (VDISCARD) + sc = tiop->c_cc[VDISCARD]; + if (sc != _POSIX_VDISABLE && kmap[(unsigned char)sc].type == ISFUNC) + tiop->c_cc[VDISCARD] = _POSIX_VDISABLE; +#endif /* VDISCARD */ + #endif /* TERMIOS_TTY_DRIVER && _POSIX_VDISABLE */ } #endif /* !NEW_TTY_DRIVER */ diff --git a/parse.y b/parse.y index f75d8d8e..29b59f81 100644 --- a/parse.y +++ b/parse.y @@ -1245,6 +1245,7 @@ pipeline_command: pipeline token_to_read = '\n'; else if ($2 == ';') token_to_read = ';'; + parser_state &= ~PST_REDIRLIST; /* make_simple_command sets this */ } | BANG list_terminator { @@ -1265,6 +1266,7 @@ pipeline_command: pipeline token_to_read = '\n'; if ($2 == ';') token_to_read = ';'; + parser_state &= ~PST_REDIRLIST; /* make_simple_command sets this */ } ;