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/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