diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-04 16:56:28 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-04 16:56:28 -0500 |
commit | 12d80d643f77a0eab18cb1278793aee006bcf289 (patch) | |
tree | fcbed30a67fc157254fc2163e388dc198b166eb2 /buffer.c | |
parent | 79766eb49ee18073da2950c22a271e5820b9f740 (diff) |
started modern opengl
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1788,9 +1788,10 @@ Status buffer_load_file(TextBuffer *buffer, char const *filename) { void buffer_reload(TextBuffer *buffer) { if (buffer->filename && !buffer_is_untitled(buffer)) { BufferPos cursor_pos = buffer->cursor_pos; - buffer_load_file(buffer, buffer->filename); - buffer->cursor_pos = cursor_pos; - buffer_validate_cursor(buffer); + if (buffer_load_file(buffer, buffer->filename)) { + buffer->cursor_pos = cursor_pos; + buffer_validate_cursor(buffer); + } } } |