summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-06-08 19:01:18 +0200
committerBram Moolenaar <Bram@vim.org>2019-06-08 19:01:18 +0200
commit24a5ac5d4dbc4dc5d6d2b7e4dda6612dd9233f5d (patch)
tree12543e8643c568f792a12a8b989fed7ee39f23d3
parentc024b4667875e5bc6fd0ed791530e33c3161bff7 (diff)
downloadvim-git-24a5ac5d4dbc4dc5d6d2b7e4dda6612dd9233f5d.tar.gz
patch 8.1.1499: ruler not updated after popup window was removedv8.1.1499
Problem: Ruler not updated after popup window was removed. Solution: use popup_mask in screen_puts().
-rw-r--r--src/screen.c6
-rw-r--r--src/testdir/dumps/Test_popupwin_07.dump10
-rw-r--r--src/testdir/dumps/Test_popupwin_08.dump10
-rw-r--r--src/testdir/test_popupwin.vim13
-rw-r--r--src/version.c2
5 files changed, 40 insertions, 1 deletions
diff --git a/src/screen.c b/src/screen.c
index 76d9b3c4b..0a93f86ad 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -7897,7 +7897,11 @@ screen_puts_len(
|| ScreenAttrs[off] != attr
|| exmode_active;
- if (need_redraw || force_redraw_this)
+ if ((need_redraw || force_redraw_this)
+#ifdef FEAT_TEXT_PROP
+ && popup_mask[row * screen_Columns + col] <= screen_zindex
+#endif
+ )
{
#if defined(FEAT_GUI) || defined(UNIX)
/* The bold trick makes a single row of pixels appear in the next
diff --git a/src/testdir/dumps/Test_popupwin_07.dump b/src/testdir/dumps/Test_popupwin_07.dump
new file mode 100644
index 000000000..5c44ad3a7
--- /dev/null
+++ b/src/testdir/dumps/Test_popupwin_07.dump
@@ -0,0 +1,10 @@
+> +0&#ffffff0@74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @52|o+0#0000001#ffd7ff255|t|h|e|r| |t|a|b| @11
+|~+0#4040ff13#ffffff0| @52|a+0#0000001#ffd7ff255| |c+0#ff404010&|o|m@1|e|n|t| +0#0000001&|l|i|n|e| @6
+|:+0#0000000#ffffff0|c|a|l@1| |p|o|p|u|p|_|m|o|v|e|(|p|o|p|u|p|w|i|n|,| |{|'|l|i|n|e|'|:| |7|,| |'|c|o|l|'|:| |5@1|}|)| @3|t+0#0000001#ffd7ff255|h|i|s| |l|i|n|e| |w|i|l@1| |n|o|t| |f|i
+| +0#0000000#ffffff0@53|t+0#0000001#ffd7ff255| |h|e|r|e| @14
diff --git a/src/testdir/dumps/Test_popupwin_08.dump b/src/testdir/dumps/Test_popupwin_08.dump
new file mode 100644
index 000000000..114e64256
--- /dev/null
+++ b/src/testdir/dumps/Test_popupwin_08.dump
@@ -0,0 +1,10 @@
+>x+0&#ffffff0@2| @71
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@74
+@57|1|,|1| @10|A|l@1|
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index 46a5d6d3f..5983dfb47 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -51,6 +51,19 @@ func Test_simple_popup()
call term_sendkeys(buf, ":redraw\<CR>")
call VerifyScreenDump(buf, 'Test_popupwin_06', {})
+ " move popup over ruler
+ call term_sendkeys(buf, ":set cmdheight=2\<CR>")
+ call term_sendkeys(buf, ":call popup_move(popupwin, {'line': 7, 'col': 55})\<CR>")
+ call VerifyScreenDump(buf, 'Test_popupwin_07', {})
+
+ " clear all popups after moving the cursor a bit, so that ruler is updated
+ call term_sendkeys(buf, "axxx\<Esc>")
+ call term_wait(buf)
+ call term_sendkeys(buf, "0")
+ call term_wait(buf)
+ call term_sendkeys(buf, ":popupclear\<CR>")
+ call VerifyScreenDump(buf, 'Test_popupwin_08', {})
+
" clean up
call StopVimInTerminal(buf)
call delete('XtestPopup')
diff --git a/src/version.c b/src/version.c
index 79b0d55ae..6635610f9 100644
--- a/src/version.c
+++ b/src/version.c
@@ -768,6 +768,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1499,
+/**/
1498,
/**/
1497,