Patch 8.1.2155
Problem:    In a terminal window 'cursorlineopt' does not work properly.
Solution:   Check the 'cursorlineopt' value. (closes #5055)
Files:      src/drawline.c, src/testdir/test_terminal.vim,
            src/testdir/dumps/Test_terminal_normal_1.dump,
            src/testdir/dumps/Test_terminal_normal_2.dump,
            src/testdir/dumps/Test_terminal_normal_3.dump


*** ../vim-8.1.2154/src/drawline.c      2019-10-16 14:38:01.916048915 +0200
--- src/drawline.c      2019-10-16 15:18:41.370985820 +0200
***************
*** 1401,1414 ****
            {
  #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
--- 1401,1407 ----
***************
*** 2295,2301 ****
                    if (win_attr != 0)
                    {
                        char_attr = win_attr;
!                       if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
                        {
                            if (!cul_screenline || (vcol >= left_curline_col
                                                  && vcol <= right_curline_col))
--- 2288,2295 ----
                    if (win_attr != 0)
                    {
                        char_attr = win_attr;
!                       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))
*** ../vim-8.1.2154/src/testdir/test_terminal.vim       2019-10-10 
16:46:13.590506986 +0200
--- src/testdir/test_terminal.vim       2019-10-16 16:17:32.528797103 +0200
***************
*** 1906,1911 ****
--- 1906,1938 ----
    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
  
*** ../vim-8.1.2154/src/testdir/dumps/Test_terminal_normal_1.dump       
2019-10-16 16:30:59.437333750 +0200
--- src/testdir/dumps/Test_terminal_normal_1.dump       2019-10-16 
16:17:46.536732991 +0200
***************
*** 0 ****
--- 1,8 ----
+ | +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| 
*** ../vim-8.1.2154/src/testdir/dumps/Test_terminal_normal_2.dump       
2019-10-16 16:30:59.441333734 +0200
--- src/testdir/dumps/Test_terminal_normal_2.dump       2019-10-16 
16:17:47.584728200 +0200
***************
*** 0 ****
--- 1,8 ----
+ | +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| 
*** ../vim-8.1.2154/src/testdir/dumps/Test_terminal_normal_3.dump       
2019-10-16 16:30:59.445333720 +0200
--- src/testdir/dumps/Test_terminal_normal_3.dump       2019-10-16 
16:17:48.636723398 +0200
***************
*** 0 ****
--- 1,8 ----
+ | +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| 
*** ../vim-8.1.2154/src/version.c       2019-10-16 14:51:36.512685665 +0200
--- src/version.c       2019-10-16 15:03:56.533945580 +0200
***************
*** 755,756 ****
--- 755,758 ----
  {   /* Add new patch number below this line */
+ /**/
+     2155,
  /**/

-- 
Living on Earth includes an annual free trip around the Sun.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201910161432.x9GEWBNj002947%40masaka.moolenaar.net.

Raspunde prin e-mail lui