patch 8.2.4685: when a swap file is found for a popup there is no dialog
Problem: When a swap file is found for a popup there is no dialog and the
buffer is loaded anyway.
Solution: Silently load the buffer read-only. (closes #10073)
diff --git a/src/popupwin.c b/src/popupwin.c
index 9c0cade..e6792c8 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -1989,7 +1989,9 @@
new_buffer = FALSE;
win_init_popup_win(wp, buf);
set_local_options_default(wp, FALSE);
+ swap_exists_action = SEA_READONLY;
buffer_ensure_loaded(buf);
+ swap_exists_action = SEA_NONE;
}
else
{