diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-05 14:27:55 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-05 14:27:55 -0500 |
commit | 6b12382231f6fe8af16554d48f2a74d9a6e53835 (patch) | |
tree | 2918f5d1ec1a0ddaeae24cf1ef2f912f3026cffa /main.c | |
parent | 759404e118b701a7c0264de5791f0158db0c7e13 (diff) |
ask to reload when file is externally changed
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,5 +1,4 @@ // @TODO: -// - popup to reload files and config on change // - find & replace (with regex) // - split // - completion @@ -508,7 +507,12 @@ int main(int argc, char **argv) { { TextBuffer *active_buffer = ted->active_buffer; if (active_buffer && buffer_externally_changed(active_buffer)) { - buffer_reload(active_buffer); + if (settings->auto_reload) + buffer_reload(active_buffer); + else { + strbuf_cpy(ted->ask_reload, buffer_get_filename(active_buffer)); + menu_open(ted, MENU_ASK_RELOAD); + } } } |