summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorcflip <cflip@cflip.net>2023-01-19 10:10:23 -0700
committercflip <cflip@cflip.net>2023-01-19 13:08:18 -0700
commitfe37b30e4a7321776621c91cacd3b58fb4247044 (patch)
treeb90f04c91f08dd4250be914d25d0479c0ce05b8f /file.c
parentb9ee44b8499d8e88d0566681a5218c8656ca6f58 (diff)
Show filename and current working directory in window title
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/file.c b/file.c
index 606fcc3..88f789e 100644
--- a/file.c
+++ b/file.c
@@ -42,6 +42,7 @@ void editor_open(struct editor_state* editor, char* filename)
memcpy(editor->filename, filename, filename_len);
editor_select_syntax_highlight(editor);
+ window_set_filename(filename);
/* If there is no file with this name, the editor will create it on save. */
if (access(filename, F_OK) != 0)
@@ -78,6 +79,7 @@ void editor_save(struct editor_state* editor)
return;
editor_select_syntax_highlight(editor);
+ window_set_filename(editor->filename);
}
int length;