diff options
author | 2008-06-12 21:58:33 +0000 | |
---|---|---|
committer | 2008-06-12 21:58:33 +0000 | |
commit | b6be5626d697a7594430208f5d1d668172f1518c (patch) | |
tree | 3a2a049f61d916d40c94c59e20c0a49c5686410e | |
parent | c-mode now understands the two most common type of comments (diff) | |
download | wireguard-openbsd-b6be5626d697a7594430208f5d1d668172f1518c.tar.xz wireguard-openbsd-b6be5626d697a7594430208f5d1d668172f1518c.zip |
incremental search isn't allowed in macros, so if your fingers
automatically go there during a macro def, the macro recording
is CANCELED. This sucks rocks.
This fixes the incremental searches to
automagically invoke the non-incremental varieties during
macro recording and playback.
ok art
-rw-r--r-- | usr.bin/mg/search.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/usr.bin/mg/search.c b/usr.bin/mg/search.c index af209a68156..ecd91426797 100644 --- a/usr.bin/mg/search.c +++ b/usr.bin/mg/search.c @@ -1,4 +1,4 @@ -/* $OpenBSD: search.c,v 1.35 2007/02/13 17:50:26 kjell Exp $ */ +/* $OpenBSD: search.c,v 1.36 2008/06/12 21:58:33 kjell Exp $ */ /* This file is in the public domain. */ @@ -127,7 +127,11 @@ searchagain(int f, int n) int forwisearch(int f, int n) { - return (isearch(SRCH_FORW)); + if (macrodef || inmacro) + /* We can't isearch in macro. Use search instead */ + return (forwsearch(f,n)); + else + return (isearch(SRCH_FORW)); } /* @@ -138,7 +142,11 @@ forwisearch(int f, int n) int backisearch(int f, int n) { - return (isearch(SRCH_BACK)); + if (macrodef || inmacro) + /* We can't isearch in macro. Use search instead */ + return (backsearch(f,n)); + else + return (isearch(SRCH_BACK)); } /* |