From 188639d75c363dffaf813e8e2209f7350ad1e871 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 4 Apr 2022 16:57:21 +0100 Subject: 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) --- runtime/doc/popup.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime/doc/popup.txt') diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt index 6645a7b2d9..dcde185e91 100644 --- a/runtime/doc/popup.txt +++ b/runtime/doc/popup.txt @@ -271,6 +271,11 @@ popup_create({what}, {options}) *popup_create()* 'buftype' set to "popup". That buffer will be wiped out once the popup closes. + if {what} is a buffer number and loading the buffer runs into + an existing swap file, it is silently opened read-only, as if + a |SwapExists| autocommand had set |v:swapchoice| to 'o'. + This is because we assume the buffer is only used for viewing. + {options} is a dictionary with many possible entries. See |popup_create-arguments| for details. -- cgit v1.2.3