diff options
author | pommicket <pommicket@gmail.com> | 2023-01-04 20:15:45 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-01-04 20:15:55 -0500 |
commit | 808b9a13cb5c71c28db6c842b78ef7f1743283cd (patch) | |
tree | 1f57a266294c9fc99673981403361c2d5507d1ba /session.c | |
parent | d9cc57e9ff1725e6e63973705adbf218d6961d17 (diff) |
the great "filename to path" rename
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -206,8 +206,8 @@ static void session_write_buffer(Ted *ted, FILE *fp, u16 buffer_idx) { write_u16(fp, buffer_idx); TextBuffer *buffer = &ted->buffers[buffer_idx]; // some info about the buffer that should be restored - if (buffer->filename && !buffer_is_untitled(buffer)) - write_cstr(fp, buffer->filename); + if (buffer_is_named_file(buffer)) + write_cstr(fp, buffer->path); else write_char(fp, 0); write_double(fp, buffer->scroll_x); @@ -233,9 +233,9 @@ static void session_read_buffer(Ted *ted, FILE *fp) { if (!buffer_has_error(buffer)) { if (*filename) { if (!buffer_load_file(buffer, filename)) - buffer_new_file(buffer, TED_UNTITLED); + buffer_new_file(buffer, NULL); } else { - buffer_new_file(buffer, TED_UNTITLED); + buffer_new_file(buffer, NULL); } buffer->scroll_x = read_double(fp); buffer->scroll_y = read_double(fp); |