summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-04 20:15:45 -0500
committerpommicket <pommicket@gmail.com>2023-01-04 20:15:55 -0500
commit808b9a13cb5c71c28db6c842b78ef7f1743283cd (patch)
tree1f57a266294c9fc99673981403361c2d5507d1ba /session.c
parentd9cc57e9ff1725e6e63973705adbf218d6961d17 (diff)
the great "filename to path" rename
Diffstat (limited to 'session.c')
-rw-r--r--session.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/session.c b/session.c
index 4d01fe9..a4c7744 100644
--- a/session.c
+++ b/session.c
@@ -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);