summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-04 16:56:28 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-04 16:56:28 -0500
commit12d80d643f77a0eab18cb1278793aee006bcf289 (patch)
treefcbed30a67fc157254fc2163e388dc198b166eb2 /buffer.c
parent79766eb49ee18073da2950c22a271e5820b9f740 (diff)
started modern opengl
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/buffer.c b/buffer.c
index ec2b748..1402718 100644
--- a/buffer.c
+++ b/buffer.c
@@ -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);
+ }
}
}