]> git.ipfire.org Git - thirdparty/readline.git/commitdiff
commit readline-20170710 snapshot
authorChet Ramey <chet.ramey@case.edu>
Mon, 10 Jul 2017 19:15:57 +0000 (15:15 -0400)
committerChet Ramey <chet.ramey@case.edu>
Mon, 10 Jul 2017 19:15:57 +0000 (15:15 -0400)
complete.c
doc/rluser.texi
doc/version.texi
misc.c
signals.c
text.c

index 662a19d5e6fd40dd61156fafe623e489627630db..adce0d69ac1d9bbf57a335c1fb0c6df36d9320c2 100644 (file)
@@ -804,6 +804,8 @@ fnprint (const char *to_print, int prefix_bytes, const char *real_pathname)
   print_len = strlen (to_print);
   end = to_print + print_len + 1;
   memset (&ps, 0, sizeof (mbstate_t));
+#else
+  print_len = strlen (to_print);
 #endif
 
   printed_len = common_prefix_len = 0;
index 22bbd1e66dfb3c7a84cae2ba228500cdbc1cc465..95de21b37934a8917330a9d6f41b447d34b28124 100644 (file)
@@ -1732,8 +1732,9 @@ A synonym for @code{yank-last-arg}.
 
 @item operate-and-get-next (C-o)
 Accept the current line for execution and fetch the next line
-relative to the current line from the history for editing.  Any
-argument is ignored.
+relative to the current line from the history for editing.
+A numeric argument, if supplied, specifies the history entry to use instead
+of the current line.
 
 @item edit-and-execute-command (C-x C-e)
 Invoke an editor on the current command line, and execute the result as shell
index fac7b5efad36e361f03f03aefe6cbc077ee39ea0..9eb9e750c6c7ad99c6b053e17824631221b0dd86 100644 (file)
@@ -4,7 +4,7 @@ Copyright (C) 1988-2017 Free Software Foundation, Inc.
 
 @set EDITION 7.0
 @set VERSION 7.0
-@set UPDATED 21 April 2017
-@set UPDATED-MONTH April 2017
+@set UPDATED 4 July 2017
+@set UPDATED-MONTH July 2017
 
-@set LASTCHANGE Fri Apr 21 15:25:17 EDT 2017
+@set LASTCHANGE Tue Jul  4 16:32:48 EDT 2017
diff --git a/misc.c b/misc.c
index 716586c721baf025b4825d57fcc0f48b2e91ff45..64b1457d29e8af0bcefc6553ca97e93cf0cd6ad0 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -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);
 }
 
index fcf45b731652462299d6f93f53c2c80483a5ecdc..add165c596768c78716757c5948770a3a8b61514 100644 (file)
--- a/signals.c
+++ b/signals.c
@@ -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);
diff --git a/text.c b/text.c
index 86a13b10130433f366ce6b92ff527e3dd752beb0..116a33b67fe098a6dc7c876af9b60e29c951f190 100644 (file)
--- a/text.c
+++ b/text.c
@@ -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);
 }