Problem: In a terminal window 'cursorlineopt' does not work properly.
Solution: Check the 'cursorlineopt' value. (closes #5055)
{
#ifdef FEAT_TERMINAL
if (get_term_attr)
- {
syntax_attr = term_get_attr(wp->w_buffer, lnum, vcol);
-
- if (!attr_pri)
- char_attr = syntax_attr;
- else
- char_attr = hl_combine_attr(syntax_attr, char_attr);
- }
#endif
#ifdef FEAT_SYN_HL
if (win_attr != 0)
{
char_attr = win_attr;
- if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
+ if (wp->w_p_cul && lnum == wp->w_cursor.lnum
+ && wp->w_p_culopt_flags != CULOPT_NBR)
{
if (!cul_screenline || (vcol >= left_curline_col
&& vcol <= right_curline_col))
--- /dev/null
+| +0#af5f00255#ffffff0@1|1| |1+0#0000000&@4| @65
+| +0#af5f00255&@1|2| |1+0#0000000&@3|2| @65
+| +8#af5f00255&@1|3| >1+8#0000000&@3|3| @65
+| +0#af5f00255&@1|4| |1+0#0000000&@3|4| @65
+| +0#af5f00255&@1|5| |1+0#0000000&@3|5| @65
+| +0#af5f00255&@1|6| |1+0#0000000&@3|6| @65
+| +0#af5f00255&@1|7| |1+0#0000000&@3|7| @65
+|:|s|e|t| |n|u|m|b|e|r| |c|u|r|s|o|r|l|i|n|e| |c|u|l|o|p|t|=|b|o|t|h| @22|3|,|1| @10|T|o|p|
--- /dev/null
+| +0#af5f00255#ffffff0@1|1| |1+0#0000000&@4| @65
+| +0#af5f00255&@1|2| |1+0#0000000&@3|2| @65
+| +8#af5f00255&@1|3| >1+0#0000000&@3|3| @65
+| +0#af5f00255&@1|4| |1+0#0000000&@3|4| @65
+| +0#af5f00255&@1|5| |1+0#0000000&@3|5| @65
+| +0#af5f00255&@1|6| |1+0#0000000&@3|6| @65
+| +0#af5f00255&@1|7| |1+0#0000000&@3|7| @65
+|:|s|e|t| |c|u|l|o|p|t|=|n|u|m|b|e|r| @38|3|,|1| @10|T|o|p|
--- /dev/null
+| +0#af5f00255#ffffff0@1|1| |1+0#0000000&@4| @65
+| +0#af5f00255&@1|2| |1+0#0000000&@3|2| @65
+| +0#af5f00255&@1|3| >1+8#0000000&@3|3| @65
+| +0#af5f00255&@1|4| |1+0#0000000&@3|4| @65
+| +0#af5f00255&@1|5| |1+0#0000000&@3|5| @65
+| +0#af5f00255&@1|6| |1+0#0000000&@3|6| @65
+| +0#af5f00255&@1|7| |1+0#0000000&@3|7| @65
+|:|s|e|t| |c|u|l|o|p|t|=|l|i|n|e| @40|3|,|1| @10|T|o|p|
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
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2155,
/**/
2154,
/**/