mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-28 16:09:51 +02:00
commit bash-20150626 snapshot
This commit is contained in:
@@ -105,7 +105,7 @@ static int rl_gather_tyi PARAMS((void));
|
||||
int
|
||||
win32_isatty (int fd)
|
||||
{
|
||||
return (_isatty (fd) ? ((((long) (HANDLE) _get_osfhandle (fd)) & 3) == 3) ? 0);
|
||||
return (_isatty (fd) ? ((((long) (HANDLE) _get_osfhandle (fd)) & 3) == 3) : 0);
|
||||
}
|
||||
|
||||
#define isatty(x) win32_isatty(x)
|
||||
|
||||
+18
-2
@@ -68,16 +68,32 @@ _rl_enable_paren_matching (on_or_off)
|
||||
int on_or_off;
|
||||
{
|
||||
if (on_or_off)
|
||||
{ /* ([{ */
|
||||
{
|
||||
/* ([{ */
|
||||
rl_bind_key_in_map (')', rl_insert_close, emacs_standard_keymap);
|
||||
rl_bind_key_in_map (']', rl_insert_close, emacs_standard_keymap);
|
||||
rl_bind_key_in_map ('}', rl_insert_close, emacs_standard_keymap);
|
||||
|
||||
#if defined (VI_MODE)
|
||||
/* ([{ */
|
||||
rl_bind_key_in_map (')', rl_insert_close, vi_insertion_keymap);
|
||||
rl_bind_key_in_map (']', rl_insert_close, vi_insertion_keymap);
|
||||
rl_bind_key_in_map ('}', rl_insert_close, vi_insertion_keymap);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{ /* ([{ */
|
||||
{
|
||||
/* ([{ */
|
||||
rl_bind_key_in_map (')', rl_insert, emacs_standard_keymap);
|
||||
rl_bind_key_in_map (']', rl_insert, emacs_standard_keymap);
|
||||
rl_bind_key_in_map ('}', rl_insert, emacs_standard_keymap);
|
||||
|
||||
#if defined (VI_MODE)
|
||||
/* ([{ */
|
||||
rl_bind_key_in_map (')', rl_insert, vi_insertion_keymap);
|
||||
rl_bind_key_in_map (']', rl_insert, vi_insertion_keymap);
|
||||
rl_bind_key_in_map ('}', rl_insert, vi_insertion_keymap);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1023,11 +1023,13 @@ _rl_subseq_result (r, map, key, got_subseq)
|
||||
func = m[ANYOTHERKEY].function;
|
||||
if (type == ISFUNC && func == rl_do_lowercase_version)
|
||||
r = _rl_dispatch (_rl_to_lower (key), map);
|
||||
else if (type == ISFUNC && func == rl_insert)
|
||||
else if (type == ISFUNC)
|
||||
{
|
||||
/* If the function that was shadowed was self-insert, we
|
||||
somehow need a keymap with map[key].func == self-insert.
|
||||
Let's use this one. */
|
||||
/* If we shadowed a function, whatever it is, we somehow need a
|
||||
keymap with map[key].func == shadowed-function.
|
||||
Let's use this one. Then we can dispatch using the original
|
||||
key, since there are commands (e.g., in vi mode) for which it
|
||||
matters. */
|
||||
nt = m[key].type;
|
||||
nf = m[key].function;
|
||||
|
||||
@@ -1038,6 +1040,7 @@ _rl_subseq_result (r, map, key, got_subseq)
|
||||
m[key].function = nf;
|
||||
}
|
||||
else
|
||||
/* We probably shadowed a keymap, so keep going. */
|
||||
r = _rl_dispatch (ANYOTHERKEY, m);
|
||||
}
|
||||
else if (r && map[ANYOTHERKEY].function)
|
||||
|
||||
Reference in New Issue
Block a user