summaryrefslogtreecommitdiff
path: root/usr.bin/mg/grep.c
diff options
context:
space:
mode:
authorKjell Wooding <kjell@cvs.openbsd.org>2009-06-04 23:39:38 +0000
committerKjell Wooding <kjell@cvs.openbsd.org>2009-06-04 23:39:38 +0000
commit6260330c332daf1197d0218472e43fd2e7750645 (patch)
tree9f4420a7b6a336fb6c5a8a2d33b2954ad42f9e1d /usr.bin/mg/grep.c
parenta513404baf363e211790bd230dd8448444415fbb (diff)
Add the notion of an "ephemeral" popup, so we can flag a window
for destruction at a later date. (in the process, add a window flag field) This fixes an issue noted by maja: namely, the *completion* window that pops up when you try to complete a filename on buffer load would destroy any second window that you happened to have open. ok maja@
Diffstat (limited to 'usr.bin/mg/grep.c')
-rw-r--r--usr.bin/mg/grep.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/mg/grep.c b/usr.bin/mg/grep.c
index 3c670c53f58..0d688b5b83f 100644
--- a/usr.bin/mg/grep.c
+++ b/usr.bin/mg/grep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grep.c,v 1.37 2009/06/04 02:23:37 kjell Exp $ */
+/* $OpenBSD: grep.c,v 1.38 2009/06/04 23:39:37 kjell Exp $ */
/* This file is in the public domain */
@@ -74,7 +74,7 @@ grep(int f, int n)
if ((bp = compile_mode("*grep*", cprompt)) == NULL)
return (FALSE);
- if ((wp = popbuf(bp)) == NULL)
+ if ((wp = popbuf(bp, WNONE)) == NULL)
return (FALSE);
curbp = bp;
compile_win = curwp = wp;
@@ -98,7 +98,7 @@ xlint(int f, int n)
if ((bp = compile_mode("*lint*", cprompt)) == NULL)
return (FALSE);
- if ((wp = popbuf(bp)) == NULL)
+ if ((wp = popbuf(bp, WNONE)) == NULL)
return (FALSE);
curbp = bp;
compile_win = curwp = wp;
@@ -125,7 +125,7 @@ compile(int f, int n)
if ((bp = compile_mode("*compile*", cprompt)) == NULL)
return (FALSE);
- if ((wp = popbuf(bp)) == NULL)
+ if ((wp = popbuf(bp, WNONE)) == NULL)
return (FALSE);
curbp = bp;
compile_win = curwp = wp;
@@ -183,7 +183,7 @@ gid(int f, int n)
if ((bp = compile_mode("*gid*", command)) == NULL)
return (FALSE);
- if ((wp = popbuf(bp)) == NULL)
+ if ((wp = popbuf(bp, WNONE)) == NULL)
return (FALSE);
curbp = bp;
compile_win = curwp = wp;
@@ -307,7 +307,7 @@ compile_goto_error(int f, int n)
if ((bp = findbuffer(adjf)) == NULL)
return (FALSE);
- if ((wp = popbuf(bp)) == NULL)
+ if ((wp = popbuf(bp, WNONE)) == NULL)
return (FALSE);
curbp = bp;
curwp = wp;