From 913d767475110bd73ce4fe772ff2444004b8f359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 6 Jul 2015 15:18:23 +0200 Subject: Move filename from Text to File Also apply syntax rules every time the file name changes. --- editor.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'editor.h') diff --git a/editor.h b/editor.h index 3fd130a..5a288b6 100644 --- a/editor.h +++ b/editor.h @@ -7,6 +7,7 @@ #include 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*); -- cgit v1.2.3