diff options
author | Kjell Wooding <kjell@cvs.openbsd.org> | 2009-06-04 23:39:38 +0000 |
---|---|---|
committer | Kjell Wooding <kjell@cvs.openbsd.org> | 2009-06-04 23:39:38 +0000 |
commit | 6260330c332daf1197d0218472e43fd2e7750645 (patch) | |
tree | 9f4420a7b6a336fb6c5a8a2d33b2954ad42f9e1d /usr.bin/mg/def.h | |
parent | a513404baf363e211790bd230dd8448444415fbb (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/def.h')
-rw-r--r-- | usr.bin/mg/def.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/usr.bin/mg/def.h b/usr.bin/mg/def.h index 2de0ef407c7..e7b79b87a95 100644 --- a/usr.bin/mg/def.h +++ b/usr.bin/mg/def.h @@ -1,4 +1,4 @@ -/* $OpenBSD: def.h,v 1.110 2009/06/04 23:31:47 kjell Exp $ */ +/* $OpenBSD: def.h,v 1.111 2009/06/04 23:39:37 kjell Exp $ */ /* This file is in the public domain. */ @@ -202,7 +202,8 @@ struct mgwin { char w_toprow; /* Origin 0 top row of window */ char w_ntrows; /* # of rows of text in window */ char w_frame; /* #lines to reframe by. */ - char w_rflag; /* Redisplay Flags. */ + char w_rflag; /* Redisplay Flags. */ + char w_flag; /* Flags. */ struct line *w_wrapline; int w_dotline; /* current line number of dot */ int w_markline; /* current line number of mark */ @@ -225,6 +226,12 @@ struct mgwin { #define WFFULL 0x08 /* Do a full display. */ #define WFMODE 0x10 /* Update mode line. */ +/* + * Window flags + */ +#define WNONE 0x00 /* No special window options. */ +#define WEPHEM 0x01 /* Window is ephemeral. */ + struct undo_rec; /* @@ -384,7 +391,6 @@ int splitwind(int, int); int enlargewind(int, int); int shrinkwind(int, int); int delwind(int, int); -struct mgwin *wpopup(void); /* buffer.c */ int togglereadonly(int, int); @@ -400,11 +406,11 @@ int anycb(int); int bclear(struct buffer *); int showbuffer(struct buffer *, struct mgwin *, int); int augbname(char *, const char *, size_t); -struct mgwin *popbuf(struct buffer *); +struct mgwin *popbuf(struct buffer *, int); int bufferinsert(int, int); int usebuffer(int, int); int notmodified(int, int); -int popbuftop(struct buffer *); +int popbuftop(struct buffer *, int); int getbufcwd(char *, size_t); int checkdirty(struct buffer *); |