diff src/testdir/test_terminal.vim @ 18321:2ffe3309958c v8.1.2155

patch 8.1.2155: in a terminal window 'cursorlineopt' does not work properly Commit: https://github.com/vim/vim/commit/a3817730c0a38ed6371b38b6db2e08547ecc674d Author: Bram Moolenaar <Bram@vim.org> Date: Wed Oct 16 16:31:44 2019 +0200 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 https://github.com/vim/vim/issues/5055)
author Bram Moolenaar <Bram@vim.org>
date Wed, 16 Oct 2019 16:45:03 +0200
parents f6dcf7eabd26
children 0e9d3a77c624
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -1906,6 +1906,33 @@ func Test_terminal_switch_mode()
   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