summaryrefslogtreecommitdiffstats
path: root/src/popupwin.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-04-04 16:57:21 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-04 16:57:21 +0100
commit188639d75c363dffaf813e8e2209f7350ad1e871 (patch)
tree5ad1a2954a8a4a821125a7f20e9667a85f3a6196 /src/popupwin.c
parentcc766a85f460ebb7f8c915508447548b5f5b99bc (diff)
patch 8.2.4685: when a swap file is found for a popup there is no dialogv8.2.4685
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)
Diffstat (limited to 'src/popupwin.c')
-rw-r--r--src/popupwin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/popupwin.c b/src/popupwin.c
index 9c0cade2da..e6792c8528 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -1989,7 +1989,9 @@ popup_create(typval_T *argvars, typval_T *rettv, create_type_T type)
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
{