Patch 8.2.4630
Problem:    'cursorline' not always updated with 'cursorlineopt' is
            "screenline".
Solution:   Call check_redraw_cursorline() more often. (closes #10013)
Files:      src/normal.c, src/edit.c, src/testdir/test_cursorline.vim,
            src/testdir/dumps/Test_cursorline_screenline_1.dump,
            src/testdir/dumps/Test_cursorline_screenline_2.dump


*** ../vim-8.2.4629/src/normal.c        2022-03-14 20:46:37.461884474 +0000
--- src/normal.c        2022-03-26 13:26:30.561775582 +0000
***************
*** 6971,6976 ****
--- 6971,6980 ----
            coladvance(getviscol());
            State = save_State;
        }
+ #ifdef FEAT_SYN_HL
+       // Might need to update for 'cursorline'.
+       check_redraw_cursorline();
+ #endif
  
        invoke_edit(cap, FALSE, cap->cmdchar, FALSE);
      }
*** ../vim-8.2.4629/src/edit.c  2022-01-31 14:59:33.510943820 +0000
--- src/edit.c  2022-03-26 13:26:16.497856326 +0000
***************
*** 1058,1063 ****
--- 1058,1067 ----
        case K_COMMAND:             // <Cmd>command<CR>
        case K_SCRIPT_COMMAND:      // <ScriptCmd>command<CR>
            do_cmdkey_command(c, 0);
+ #ifdef FEAT_SYN_HL
+           // Might need to update for 'cursorline'.
+           check_redraw_cursorline();
+ #endif
  #ifdef FEAT_TERMINAL
            if (term_use_loop())
                // Started a terminal that gets the input, exit Insert mode.
*** ../vim-8.2.4629/src/testdir/test_cursorline.vim     2022-03-22 
21:14:51.752456009 +0000
--- src/testdir/test_cursorline.vim     2022-03-26 13:22:52.847181925 +0000
***************
*** 272,276 ****
--- 272,297 ----
    call delete('Xcul_timer')
  endfunc
  
+ func Test_cursorline_screenline_update()
+   CheckScreendump
+ 
+   let lines =<< trim END
+       call setline(1, repeat('xyz ', 30))
+       set cursorline cursorlineopt=screenline
+       inoremap <F2> <Cmd>call cursor(1, 1)<CR>
+   END
+   call writefile(lines, 'Xcul_screenline')
+ 
+   let buf = RunVimInTerminal('-S Xcul_screenline', #{rows: 8})
+   call term_sendkeys(buf, "A")
+   call VerifyScreenDump(buf, 'Test_cursorline_screenline_1', {})
+   call term_sendkeys(buf, "\<F2>")
+   call VerifyScreenDump(buf, 'Test_cursorline_screenline_2', {})
+   call term_sendkeys(buf, "\<Esc>")
+ 
+   call StopVimInTerminal(buf)
+   call delete('Xcul_screenline')
+ endfunc
+ 
  
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.4629/src/testdir/dumps/Test_cursorline_screenline_1.dump 
2022-03-26 13:26:52.985649288 +0000
--- src/testdir/dumps/Test_cursorline_screenline_1.dump 2022-03-26 
13:25:09.458258689 +0000
***************
*** 0 ****
--- 1,8 ----
+ |x+0&#ffffff0|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| 
|x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| 
|x|y|z
+ | +8&&|x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| 
|x|y|z| |x|y|z| > @29
+ |~+0#4040ff13&| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|1|,|1|2|1| @8|A|l@1| 
*** ../vim-8.2.4629/src/testdir/dumps/Test_cursorline_screenline_2.dump 
2022-03-26 13:26:52.989649268 +0000
--- src/testdir/dumps/Test_cursorline_screenline_2.dump 2022-03-26 
13:25:10.518252091 +0000
***************
*** 0 ****
--- 1,8 ----
+ >x+8&#ffffff0|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| 
|x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| 
|x|y|z
+ | +0&&|x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| |x|y|z| 
|x|y|z| |x|y|z| @30
+ |~+0#4040ff13&| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@44|1|,|1| @10|A|l@1| 
*** ../vim-8.2.4629/src/version.c       2022-03-26 10:50:06.546446647 +0000
--- src/version.c       2022-03-26 13:11:05.897059693 +0000
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     4630,
  /**/

-- 
I'm sure that I asked CBuilder to do a "full" install.  Looks like I got
a "fool" install, instead.              Charles E Campbell, Jr, PhD


 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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/20220326132920.CD5981C0C1F%40moolenaar.net.

Raspunde prin e-mail lui