aboutsummaryrefslogtreecommitdiff
path: root/editor.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-07-06 15:18:23 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-07-06 15:18:23 +0200
commit913d767475110bd73ce4fe772ff2444004b8f359 (patch)
treee65f099568444167ca6ebac2c2368e653b7e1ef3 /editor.h
parente7dabd3d87d89efe2fadbe1e21d03fbeb3cc68a6 (diff)
downloadvis-913d767475110bd73ce4fe772ff2444004b8f359.tar.gz
vis-913d767475110bd73ce4fe772ff2444004b8f359.tar.xz
Move filename from Text to File
Also apply syntax rules every time the file name changes.
Diffstat (limited to 'editor.h')
-rw-r--r--editor.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/editor.h b/editor.h
index 3fd130a..5a288b6 100644
--- a/editor.h
+++ b/editor.h
@@ -7,6 +7,7 @@
#include <stdbool.h>
typedef struct Editor Editor;
+typedef struct File File;
typedef struct Win Win;
#include "ui.h"
@@ -17,8 +18,6 @@ typedef struct Win Win;
#include "ring-buffer.h"
#include "map.h"
-typedef struct File File;
-
typedef union {
bool b;
int i;
@@ -194,6 +193,7 @@ enum Mark {
struct File {
Text *text;
+ const char *name;
int refcount;
Mark marks[MARK_LAST];
File *next, *prev;
@@ -291,6 +291,8 @@ bool editor_window_split(Win*);
/* focus the next / previous window */
void editor_window_next(Editor*);
void editor_window_prev(Editor*);
+/* set the filename of the file displayed in this window */
+void editor_window_name(Win*, const char *filename);
void editor_window_jumplist_add(Win*, size_t pos);
size_t editor_window_jumplist_prev(Win*);