summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-04 20:44:19 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-04 20:44:19 +0200
commit2debf1c16b93f8693a785f675320d9e949c96a97 (patch)
tree5734e85cb84615af6c57aed4a7896543879488eb /src/ex_cmds.c
parentfb06d767a8d76eead5391302fc88115d6e3879d8 (diff)
patch 8.1.1813: ATTENTION prompt for a preview popup windowv8.1.1813
Problem: ATTENTION prompt for a preview popup window. Solution: Close the popup window if aborting the buffer load. Avoid getting the ATTENTION dialog.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index f79f054ec5..98f5070bcb 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2454,7 +2454,7 @@ do_wqall(exarg_T *eap)
/*
* Check the 'write' option.
- * Return TRUE and give a message when it's not st.
+ * Return TRUE and give a message when it's not set.
*/
int
not_writing(void)
@@ -3118,6 +3118,12 @@ do_ecmd(
topline = curwin->w_topline;
if (!oldbuf) /* need to read the file */
{
+#ifdef FEAT_TEXT_PROP
+ // Don't use the swap-exists dialog for a popup window, can't edit
+ // the buffer.
+ if (WIN_IS_POPUP(curwin))
+ curbuf->b_flags |= BF_NO_SEA;
+#endif
swap_exists_action = SEA_DIALOG;
curbuf->b_flags |= BF_CHECK_RO; /* set/reset 'ro' flag */
@@ -3131,6 +3137,9 @@ do_ecmd(
(void)open_buffer(FALSE, eap, readfile_flags);
#endif
+#ifdef FEAT_TEXT_PROP
+ curbuf->b_flags &= ~BF_NO_SEA;
+#endif
if (swap_exists_action == SEA_QUIT)
retval = FAIL;
handle_swap_exists(&old_curbuf);
@@ -3173,7 +3182,7 @@ do_ecmd(
maketitle();
#endif
#ifdef FEAT_TEXT_PROP
- if (popup_is_popup(curwin) && curwin->w_p_pvw)
+ if (WIN_IS_POPUP(curwin) && curwin->w_p_pvw && retval != FAIL)
popup_set_title(curwin);
#endif
}