patch 8.1.2155: in a terminal window 'cursorlineopt' does not work properly
Problem: In a terminal window 'cursorlineopt' does not work properly.
Solution: Check the 'cursorlineopt' value. (closes #5055)
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index 7e8ef76..383dfed 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -1906,6 +1906,33 @@
bwipe!
endfunc
+func Test_terminal_normal_mode()
+ CheckRunVimInTerminal
+
+ " Run Vim in a terminal and open a terminal window to run Vim in.
+ let lines =<< trim END
+ call setline(1, range(11111, 11122))
+ 3
+ END
+ call writefile(lines, 'XtermNormal')
+ let buf = RunVimInTerminal('-S XtermNormal', {'rows': 8})
+ call term_wait(buf)
+
+ call term_sendkeys(buf, "\<C-W>N")
+ call term_sendkeys(buf, ":set number cursorline culopt=both\r")
+ call VerifyScreenDump(buf, 'Test_terminal_normal_1', {})
+
+ call term_sendkeys(buf, ":set culopt=number\r")
+ call VerifyScreenDump(buf, 'Test_terminal_normal_2', {})
+
+ call term_sendkeys(buf, ":set culopt=line\r")
+ call VerifyScreenDump(buf, 'Test_terminal_normal_3', {})
+
+ call term_sendkeys(buf, "a:q!\<CR>:q\<CR>:q\<CR>")
+ call StopVimInTerminal(buf)
+ call delete('XtermNormal')
+endfunc
+
func Test_terminal_hidden_and_close()
CheckUnix