diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2014-09-10 14:12:53 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2014-09-10 14:12:53 +0200 |
| commit | d1eb042871f2da438286f15c65b0020bdac10f0e (patch) | |
| tree | 4b9a5adbb68c52481a5c0afa14b6c090bd4164bd /text.c | |
| parent | 17a71a69823e93fc4ef8495e6efb93cfdcdf66e1 (diff) | |
| download | vis-d1eb042871f2da438286f15c65b0020bdac10f0e.tar.gz vis-d1eb042871f2da438286f15c65b0020bdac10f0e.tar.xz | |
If text has been created from an empty file, store filename upon first save
Diffstat (limited to 'text.c')
| -rw-r--r-- | text.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -610,6 +610,8 @@ int text_save(Text *txt, const char *filename) { return -1; txt->saved_action = txt->undo; text_snapshot(txt); + if (!txt->filename) + txt->filename = strdup(filename); return 0; err: close(fd); |
