summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ted.c b/ted.c
index 4b80a97..a1cbed5 100644
--- a/ted.c
+++ b/ted.c
@@ -193,6 +193,7 @@ static bool ted_open_file(Ted *ted, char const *filename) {
for (u16 i = 0; i < TED_MAX_BUFFERS; ++i) {
if (buffers_used[i]) {
if (streq(filename, buffer_get_filename(&buffers[i]))) {
+ buffer_reload(&buffers[i]); // make sure buffer is up to date with the file
ted_switch_to_buffer(ted, i);
return true;
}