]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - lib/readline/parens.c
Imported from ../bash-2.05.tar.gz.
[thirdparty/bash.git] / lib / readline / parens.c
index b6de529f1a000611783b33c7ed465ed989e74a88..d1e66f598140816a1fef393cefece456e9bbcb8e 100644 (file)
@@ -64,6 +64,8 @@ int rl_blink_matching_paren = 1;
 int rl_blink_matching_paren = 0;
 #endif /* !HAVE_SELECT */
 
+static int _paren_blink_usec = 500000;
+
 /* Change emacs_standard_keymap to have bindings for paren matching when
    ON_OR_OFF is 1, change them back to self_insert when ON_OR_OFF == 0. */
 void
@@ -84,6 +86,18 @@ _rl_enable_paren_matching (on_or_off)
     }
 }
 
+int
+rl_set_paren_blink_timeout (u)
+     int u;
+{
+  int o;
+
+  o = _paren_blink_usec;
+  if (u > 0)
+    _paren_blink_usec = u;
+  return (o);
+}
+
 int
 rl_insert_close (count, invoking_key)
      int count, invoking_key;
@@ -109,7 +123,7 @@ rl_insert_close (count, invoking_key)
       FD_ZERO (&readfds);
       FD_SET (fileno (rl_instream), &readfds);
       timer.tv_sec = 0;
-      timer.tv_usec = 500000;
+      timer.tv_usec = _paren_blink_usec;
 
       orig_point = rl_point;
       rl_point = match_point;