diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-04 13:00:26 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-04 13:00:26 -0500 |
commit | 79766eb49ee18073da2950c22a271e5820b9f740 (patch) | |
tree | ce527bb878182efc9a63d7af49bb85aaa82d132c /main.c | |
parent | c77fc69367003edb43b480f1726db02641bdd0be (diff) |
improve auto-add-newline, start reloading
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 |