commit bash-20170707 snapshot

This commit is contained in:
Chet Ramey
2017-07-10 14:57:09 -04:00
parent 6364d76ebc
commit 68fd3b7615
7 changed files with 75 additions and 10 deletions
+2
View File
@@ -275,6 +275,8 @@ _rl_arg_callback (_rl_arg_cxt cxt)
}
r = _rl_arg_dispatch (cxt, c);
if (r > 0)
rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
return (r != 1);
}
+2
View File
@@ -249,9 +249,11 @@ _rl_handle_signal (int sig)
rl_cleanup_after_signal ();
#if defined (HAVE_POSIX_SIGNALS)
# if defined (SIGTSTP)
/* Unblock SIGTTOU blocked above */
if (sig == SIGTTIN || sig == SIGTSTP)
sigprocmask (SIG_UNBLOCK, &set, (sigset_t *)NULL);
# endif
sigemptyset (&set);
sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set);
+29 -3
View File
@@ -980,14 +980,29 @@ _rl_insert_next (int count)
static int
_rl_insert_next_callback (_rl_callback_generic_arg *data)
{
int count;
int count, r;
count = data->count;
r = 0;
if (count < 0)
{
data->count++;
r = _rl_insert_next (1);
_rl_want_redisplay = 1;
/* If we should keep going, leave the callback function installed */
if (data->count < 0 && r == 0)
return r;
count = 0; /* data->count == 0 || r != 0; force break below */
}
/* Deregister function, let rl_callback_read_char deallocate data */
_rl_callback_func = 0;
_rl_want_redisplay = 1;
if (count == 0)
return r;
return _rl_insert_next (count);
}
#endif
@@ -1009,7 +1024,18 @@ rl_quoted_insert (int count, int key)
return (0);
}
#endif
/* A negative count means to quote the next -COUNT characters. */
if (count < 0)
{
int r;
do
r = _rl_insert_next (1);
while (r == 0 && ++count < 0);
return r;
}
return _rl_insert_next (count);
}