summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.c b/main.c
index 709b23d..a7fbda0 100644
--- a/main.c
+++ b/main.c
@@ -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);
+ }
}
}