patch 8.1.2009: cursorline highlighting not updated in popup window
Problem: Cursorline highlighting not updated in popup window. (Marko
Mahnič)
Solution: Check if the cursor position changed. (closes #4912)
diff --git a/src/testdir/dumps/Test_popupwin_cursorline_7.dump b/src/testdir/dumps/Test_popupwin_cursorline_7.dump
new file mode 100644
index 0000000..15eb0be
--- /dev/null
+++ b/src/testdir/dumps/Test_popupwin_cursorline_7.dump
@@ -0,0 +1,10 @@
+> +0&#ffffff0@74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @34|1+0#0000001#ffd7ff255@2| +0#4040ff13#ffffff0@35
+|~| @34|2+0#0000001#e0e0e08@2| +0#4040ff13#ffffff0@35
+|~| @34|3+0#0000001#ffd7ff255@2| +0#4040ff13#ffffff0@35
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|0|,|0|-|1| @8|A|l@1|
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index cbfc7d2..a338169 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -2306,6 +2306,20 @@
call term_sendkeys(buf, "x")
call StopVimInTerminal(buf)
+ " ---------
+ " Cursor in second line when creating the popup
+ " ---------
+ let lines =<< trim END
+ let winid = popup_create(['111', '222', '333'], #{
+ \ cursorline : 1,
+ \ })
+ call win_execute(winid, "2")
+ END
+ call writefile(lines, 'XtestPopupCursorLine')
+ let buf = RunVimInTerminal('-S XtestPopupCursorLine', #{rows: 10})
+ call VerifyScreenDump(buf, 'Test_popupwin_cursorline_7', {})
+ call StopVimInTerminal(buf)
+
call delete('XtestPopupCursorLine')
endfunc