diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-30 13:21:53 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-30 13:21:53 -0500 |
commit | b35a780479bbf5038a825d415f9ca49c92f6b425 (patch) | |
tree | 44e71007552714b03ae812e466495ec5c8a7e27b /buffer.c | |
parent | a61d90c32d4d6448148894872ebd91eb8f10fc2e (diff) |
ctrl+q to quit (with unsaved changes dialog)
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -640,6 +640,8 @@ void buffer_new_file(TextBuffer *buffer, char const *filename) { buffer->nlines = 1; } +// Save the buffer to its current filename. This will rewrite the entire file, regardless of +// whether there are any unsaved changes. bool buffer_save(TextBuffer *buffer) { if (!buffer->is_line_buffer && buffer->filename) { FILE *out = fopen(buffer->filename, "wb"); |