summaryrefslogtreecommitdiff
path: root/main.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 /main.c
parentc77fc69367003edb43b480f1726db02641bdd0be (diff)
improve auto-add-newline, start reloading
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/main.c b/main.c
index 96820b6..e4445b8 100644
--- a/main.c
+++ b/main.c
@@ -39,8 +39,8 @@ no_warn_end
#include "command.h"
#include "colors.h"
-#include "ted.h"
#include "time.c"
+#include "ted.h"
#include "string32.c"
#include "arr.c"
#include "syntax.c"
@@ -462,6 +462,14 @@ int main(int argc, char **argv) {
}
}
}
+
+ // check if active buffer should be reloaded
+ {
+ TextBuffer *active_buffer = ted->active_buffer;
+ if (active_buffer && buffer_externally_changed(active_buffer)) {
+ buffer_reload(active_buffer);
+ }
+ }
u32 key_modifier = (u32)ctrl_down << KEY_MODIFIER_CTRL_BIT