diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-23 15:20:20 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-23 15:20:20 +0000 |
commit | abb61ce683318d721396b54a1f1ac6745f07d3f9 (patch) | |
tree | bb0e79b09d7ae77a069cb94fce376ee741a2e9f4 | |
parent | 7d6747adcf5a8d1ca00de2d311150d797b1337cd (diff) |
When showing the matching paren, don't sleep for one second, use ttwait
instead so that the sleep is aborted when we continue typing.
-rw-r--r-- | usr.bin/mg/match.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/mg/match.c b/usr.bin/mg/match.c index 531a9a54e17..159a21d1366 100644 --- a/usr.bin/mg/match.c +++ b/usr.bin/mg/match.c @@ -1,4 +1,4 @@ -/* $OpenBSD: match.c,v 1.4 2001/01/29 01:58:08 niklas Exp $ */ +/* $OpenBSD: match.c,v 1.5 2001/05/23 15:20:19 art Exp $ */ /* * Limited parenthesis matching routines @@ -169,17 +169,17 @@ displaymatch(clp, cbo) inwindow = TRUE; if (inwindow == TRUE) { - tlp = curwp->w_dotp; /* save current position */ + tlp = curwp->w_dotp; /* save current position */ tbo = curwp->w_doto; - curwp->w_dotp = clp; /* move to new position */ + curwp->w_dotp = clp; /* move to new position */ curwp->w_doto = cbo; curwp->w_flag |= WFMOVE; - update(); /* show match */ - sleep(1); /* wait a bit */ + update(); /* show match */ + ttwait(1000); /* wait for key or 1 second */ - curwp->w_dotp = tlp; /* return to old position */ + curwp->w_dotp = tlp; /* return to old position */ curwp->w_doto = tbo; curwp->w_flag |= WFMOVE; update(); |