summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-04 13:00:26 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-04 13:00:26 -0500
commit79766eb49ee18073da2950c22a271e5820b9f740 (patch)
treece527bb878182efc9a63d7af49bb85aaa82d132c /ted.c
parentc77fc69367003edb43b480f1726db02641bdd0be (diff)
improve auto-add-newline, start reloading
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;
}