diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-07-06 15:18:23 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-07-06 15:18:23 +0200 |
| commit | 913d767475110bd73ce4fe772ff2444004b8f359 (patch) | |
| tree | e65f099568444167ca6ebac2c2368e653b7e1ef3 /editor.h | |
| parent | e7dabd3d87d89efe2fadbe1e21d03fbeb3cc68a6 (diff) | |
| download | vis-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.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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*); |
