1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2022-04-04 16:57:21 +01:00
parent cc766a85f4
commit 188639d75c
7 changed files with 105 additions and 62 deletions

View File

@@ -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
{