Patch 8.2.4795
Problem:    'cursorbind' scrolling depends on whether 'cursorline' is set.
Solution:   Always call validate_cursor(). (Christian Brabandt, closes #10230,
            closes #10014)
Files:      src/move.c, src/testdir/README.txt,
            src/testdir/test_cursorline.vim,
            src/testdir/dumps/Test_hor_scroll_1.dump,
            src/testdir/dumps/Test_hor_scroll_2.dump,
            src/testdir/dumps/Test_hor_scroll_3.dump,
            src/testdir/dumps/Test_hor_scroll_4.dump


*** ../vim-8.2.4794/src/move.c  2022-03-28 12:41:14.406200360 +0100
--- src/move.c  2022-04-20 14:41:23.566851584 +0100
***************
*** 2918,2927 ****
            restart_edit_save = restart_edit;
            restart_edit = TRUE;
            check_cursor();
! # ifdef FEAT_SYN_HL
!           if (curwin->w_p_cul || curwin->w_p_cuc)
!               validate_cursor();
! # endif
            restart_edit = restart_edit_save;
            // Correct cursor for multi-byte character.
            if (has_mbyte)
--- 2918,2924 ----
            restart_edit_save = restart_edit;
            restart_edit = TRUE;
            check_cursor();
!           validate_cursor();
            restart_edit = restart_edit_save;
            // Correct cursor for multi-byte character.
            if (has_mbyte)
*** ../vim-8.2.4794/src/testdir/README.txt      2020-08-30 18:26:40.736556825 
+0100
--- src/testdir/README.txt      2022-04-20 14:46:12.578594883 +0100
***************
*** 41,46 ****
--- 41,61 ----
    with "Skipped" so that it's clear this still needs work.  E.g.: throw
    "Skipped: Bug with <c-e> and popupmenu not fixed yet"
  
+ - The following environment variables are recognized and can be set to
+   influence the behavior of the test suite (see runtest.vim for details)
+ 
+   - $TEST_MAY_FAIL=Test_channel_one    - ignore those failing tests
+   - $TEST_FILTER=Test_channel    - only run test that match this pattern
+   - $TEST_SKIP_PAT=Test_channel  - skip tests that match this pattern
+   - $TEST_NO_RETRY=yes           - do not try to re-run failing tests
+   You can also set them in Vim:
+     :let $TEST_MAY_FAIL = 'Test_channel_one'
+     :let $TEST_FILTER = '_set_mode'
+     :let $TEST_SKIP_PAT = 'Test_loop_forever'
+     :let $TEST_NO_RETRY = 'yes'
+   Use an empty string to revert, e.g.:
+     :let $TEST_FILTER = ''
+ 
  - See the start of runtest.vim for more help.
  
  
***************
*** 55,60 ****
  There are a few tests that are used when Vim was built without the +eval
  feature.  These cannot use the "assert" functions, therefore they consist of a
  .in file that contains Normal mode commands between STARTTEST and ENDTEST.
! They modify the file and the result gets writtein in the test.out file.  This
  is then compared with the .ok file.  If they are equal the test passed.  If
  they differ the test failed.
--- 70,121 ----
  There are a few tests that are used when Vim was built without the +eval
  feature.  These cannot use the "assert" functions, therefore they consist of a
  .in file that contains Normal mode commands between STARTTEST and ENDTEST.
! They modify the file and the result gets written in the test.out file.  This
  is then compared with the .ok file.  If they are equal the test passed.  If
  they differ the test failed.
+ 
+ 
+ RUNNING THE TESTS:
+ 
+ To run a single test from the src directory:
+ 
+     $ make test_<name>
+ 
+ The below commands should be run from the src/testdir directory.
+ 
+ To run a single test:
+ 
+     $ make test_<name>.res
+ 
+ The file 'messages' contains the messages generated by the test script.  If a
+ test fails, then the test.log file contains the error messages.  If all the
+ tests are successful, then this file will be an empty file.
+ 
+ - To run a single test function from a test script:
+ 
+     $ ../vim -u NONE -S runtest.vim <test_file>.vim <function_name>
+ 
+ - To execute only specific test functions, add a second argument:
+ 
+        $ ../vim -u NONE -S runtest.vim test_channel.vim open_delay
+ 
+ 
+ - To run all the tests:
+ 
+     $ make
+ 
+ - To run the test on MS-Windows using the MSVC nmake:
+ 
+     > nmake -f Make_dos.mak
+ 
+ - To run the tests with GUI Vim:
+ 
+     $ make GUI_FLAG=-g
+ 
+     or
+ 
+     $ make VIMPROG=../gvim
+ 
+ - To cleanup the temporary files after running the tests:
+ 
+     $ make clean
*** ../vim-8.2.4794/src/testdir/test_cursorline.vim     2022-03-26 
13:27:06.201576216 +0000
--- src/testdir/test_cursorline.vim     2022-04-20 14:41:23.570851580 +0100
***************
*** 293,297 ****
--- 293,329 ----
    call delete('Xcul_screenline')
  endfunc
  
+ func Test_cursorline_cursorbind_horizontal_scroll()
+   CheckScreendump
+ 
+   let lines =<< trim END
+       call setline(1, 'aa bb cc dd ee ff gg hh ii jj kk ll mm' .. 
+       \ ' nn oo pp qq rr ss tt uu vv ww xx yy zz')
+       set nowrap
+       " The following makes the cursor apparent on the screen dump
+       set sidescroll=1 cursorcolumn
+       " add empty lines, required for cursorcolumn
+       call append(1, ['','','',''])
+       20vsp
+       windo :set cursorbind
+   END
+   call writefile(lines, 'Xhor_scroll')
+ 
+   let buf = RunVimInTerminal('-S Xhor_scroll', #{rows: 8})
+   call term_sendkeys(buf, "20l")
+   call VerifyScreenDump(buf, 'Test_hor_scroll_1', {})
+   call term_sendkeys(buf, "10l")
+   call VerifyScreenDump(buf, 'Test_hor_scroll_2', {})
+   call term_sendkeys(buf, ":windo :set cursorline\<cr>")
+   call term_sendkeys(buf, "0")
+   call term_sendkeys(buf, "20l")
+   call VerifyScreenDump(buf, 'Test_hor_scroll_3', {})
+   call term_sendkeys(buf, "10l")
+   call VerifyScreenDump(buf, 'Test_hor_scroll_4', {})
+ 
+   call StopVimInTerminal(buf)
+   "call delete('Xhor_scroll')
+ endfunc
+ 
  
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.4794/src/testdir/dumps/Test_hor_scroll_1.dump    2022-04-20 
14:48:19.162490311 +0100
--- src/testdir/dumps/Test_hor_scroll_1.dump    2022-04-20 14:41:23.570851580 
+0100
***************
*** 0 ****
--- 1,8 ----
+ |a+0&#ffffff0| |b@1| |c@1| |d@1| |e@1| |f@1| |g@1| ||+1&&|a+0&&@1| |b@1| 
|c@1| |d@1| |e@1| |f@1| |g@1> |h@1| |i@1| |j@1| |k@1| |l@1| |m@1| |n@1| |o@1| 
|p@1| |q@1| |r@1| 
+ @19| +0&#e0e0e08||+1&#ffffff0| +0&&@19| +0&#e0e0e08| +0&#ffffff0@32
+ @19| +0&#e0e0e08||+1&#ffffff0| +0&&@19| +0&#e0e0e08| +0&#ffffff0@32
+ @19| +0&#e0e0e08||+1&#ffffff0| +0&&@19| +0&#e0e0e08| +0&#ffffff0@32
+ @19| +0&#e0e0e08||+1&#ffffff0| +0&&@19| +0&#e0e0e08| +0&#ffffff0@32
+ |~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @52
+ |<+1#0000000&|a|m|e|]| |[|+|]| |1|,|2|1| @2|A|l@1| |[+3&&|N|o| |N|a|m|e|]| 
|[|+|]| @22|1|,|2|1| @10|A|l@1
+ | +0&&@74
*** ../vim-8.2.4794/src/testdir/dumps/Test_hor_scroll_2.dump    2022-04-20 
14:48:19.170490304 +0100
--- src/testdir/dumps/Test_hor_scroll_2.dump    2022-04-20 14:41:23.570851580 
+0100
***************
*** 0 ****
--- 1,8 ----
+ | +0&#ffffff0|h@1| |i@1| |j@1| |k@1| |l@1| |m@1| |n||+1&&|a+0&&@1| |b@1| 
|c@1| |d@1| |e@1| |f@1| |g@1| |h@1| |i@1| |j@1| >k@1| |l@1| |m@1| |n@1| |o@1| 
|p@1| |q@1| |r@1| 
+ @10| +0&#e0e0e08| +0&#ffffff0@8||+1&&| +0&&@29| +0&#e0e0e08| +0&#ffffff0@22
+ @10| +0&#e0e0e08| +0&#ffffff0@8||+1&&| +0&&@29| +0&#e0e0e08| +0&#ffffff0@22
+ @10| +0&#e0e0e08| +0&#ffffff0@8||+1&&| +0&&@29| +0&#e0e0e08| +0&#ffffff0@22
+ @10| +0&#e0e0e08| +0&#ffffff0@8||+1&&| +0&&@29| +0&#e0e0e08| +0&#ffffff0@22
+ |~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @52
+ |<+1#0000000&|a|m|e|]| |[|+|]| |1|,|3|1| @2|A|l@1| |[+3&&|N|o| |N|a|m|e|]| 
|[|+|]| @22|1|,|3|1| @10|A|l@1
+ | +0&&@74
*** ../vim-8.2.4794/src/testdir/dumps/Test_hor_scroll_3.dump    2022-04-20 
14:48:19.174490300 +0100
--- src/testdir/dumps/Test_hor_scroll_3.dump    2022-04-20 14:41:23.570851580 
+0100
***************
*** 0 ****
--- 1,8 ----
+ |a+8&#ffffff0| |b@1| |c@1| |d@1| |e@1| |f@1| |g@1| ||+1&&|a+8&&@1| |b@1| 
|c@1| |d@1| |e@1| |f@1| |g@1> |h@1| |i@1| |j@1| |k@1| |l@1| |m@1| |n@1| |o@1| 
|p@1| |q@1| |r@1| 
+ | +0&&@18| +0&#e0e0e08||+1&#ffffff0| +0&&@19| +0&#e0e0e08| +0&#ffffff0@32
+ @19| +0&#e0e0e08||+1&#ffffff0| +0&&@19| +0&#e0e0e08| +0&#ffffff0@32
+ @19| +0&#e0e0e08||+1&#ffffff0| +0&&@19| +0&#e0e0e08| +0&#ffffff0@32
+ @19| +0&#e0e0e08||+1&#ffffff0| +0&&@19| +0&#e0e0e08| +0&#ffffff0@32
+ |~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @52
+ |<+1#0000000&|a|m|e|]| |[|+|]| |1|,|2|1| @2|A|l@1| |[+3&&|N|o| |N|a|m|e|]| 
|[|+|]| @22|1|,|2|1| @10|A|l@1
+ |:+0&&|w|i|n|d|o| |:|s|e|t| |c|u|r|s|o|r|l|i|n|e| @52
*** ../vim-8.2.4794/src/testdir/dumps/Test_hor_scroll_4.dump    2022-04-20 
14:48:19.178490295 +0100
--- src/testdir/dumps/Test_hor_scroll_4.dump    2022-04-20 14:41:23.570851580 
+0100
***************
*** 0 ****
--- 1,8 ----
+ | +8&#ffffff0|h@1| |i@1| |j@1| |k@1| |l@1| |m@1| |n||+1&&|a+8&&@1| |b@1| 
|c@1| |d@1| |e@1| |f@1| |g@1| |h@1| |i@1| |j@1| >k@1| |l@1| |m@1| |n@1| |o@1| 
|p@1| |q@1| |r@1| 
+ | +0&&@9| +0&#e0e0e08| +0&#ffffff0@8||+1&&| +0&&@29| +0&#e0e0e08| 
+0&#ffffff0@22
+ @10| +0&#e0e0e08| +0&#ffffff0@8||+1&&| +0&&@29| +0&#e0e0e08| +0&#ffffff0@22
+ @10| +0&#e0e0e08| +0&#ffffff0@8||+1&&| +0&&@29| +0&#e0e0e08| +0&#ffffff0@22
+ @10| +0&#e0e0e08| +0&#ffffff0@8||+1&&| +0&&@29| +0&#e0e0e08| +0&#ffffff0@22
+ |~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @52
+ |<+1#0000000&|a|m|e|]| |[|+|]| |1|,|3|1| @2|A|l@1| |[+3&&|N|o| |N|a|m|e|]| 
|[|+|]| @22|1|,|3|1| @10|A|l@1
+ |:+0&&|w|i|n|d|o| |:|s|e|t| |c|u|r|s|o|r|l|i|n|e| @52
*** ../vim-8.2.4794/src/version.c       2022-04-20 10:22:50.150322858 +0100
--- src/version.c       2022-04-20 14:43:31.294734449 +0100
***************
*** 748,749 ****
--- 748,751 ----
  {   /* Add new patch number below this line */
+ /**/
+     4795,
  /**/

-- 
How To Keep A Healthy Level Of Insanity:
18. When leaving the zoo, start running towards the parking lot,
    yelling "run for your lives, they're loose!!"

 /// 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/20220420135311.C1EB01C170F%40moolenaar.net.

Raspunde prin e-mail lui