Patch 9.0.0702
Problem:    Incomplete testing cursor position after change with 'linebreak'
            set.
Solution:   Add a test and move test cases together. (closes #11313)
Files:      src/testdir/test_listlbr.vim, src/testdir/test_visual.vim,
            src/testdir/dumps/Test_linebreak_reset_restore_1.dump


*** ../vim-9.0.0701/src/testdir/test_listlbr.vim        2022-10-08 
16:41:09.379815330 +0100
--- src/testdir/test_listlbr.vim        2022-10-09 11:40:01.901620790 +0100
***************
*** 134,155 ****
    call s:close_windows()
  endfunc
  
  func Test_linebreak_reset_restore()
    CheckScreendump
  
    let lines =<< trim END
!       vim9script
!       &linebreak = true
!       &showcmd = true
!       &showmode = false
!       ('a'->repeat(&columns - 10) .. ' ' .. 'b'->repeat(10) .. ' 
c')->setline(1)
    END
    call writefile(lines, 'XlbrResetRestore', 'D')
    let buf = RunVimInTerminal('-S XlbrResetRestore', {'rows': 8})
  
!   call term_sendkeys(buf, '$v$s')
    call VerifyScreenDump(buf, 'Test_linebreak_reset_restore_1', {})
  
    call term_sendkeys(buf, "\<Esc>")
    call StopVimInTerminal(buf)
  endfunc
--- 134,174 ----
    call s:close_windows()
  endfunc
  
+ " Test that cursor is drawn at correct position after an operator when
+ " 'linebreak' is enabled.
  func Test_linebreak_reset_restore()
    CheckScreendump
  
+   " f_wincol() calls validate_cursor()
    let lines =<< trim END
!     set linebreak showcmd noshowmode formatexpr=wincol()-wincol()
!     call setline(1, repeat('a', &columns - 10) .. ' bbbbbbbbbb c')
    END
    call writefile(lines, 'XlbrResetRestore', 'D')
    let buf = RunVimInTerminal('-S XlbrResetRestore', {'rows': 8})
  
!   call term_sendkeys(buf, '$v$')
!   call WaitForAssert({-> assert_equal(13, term_getcursor(buf)[1])})
!   call term_sendkeys(buf, 'zo')
!   call WaitForAssert({-> assert_equal(12, term_getcursor(buf)[1])})
! 
!   call term_sendkeys(buf, '$v$')
!   call WaitForAssert({-> assert_equal(13, term_getcursor(buf)[1])})
!   call term_sendkeys(buf, 'gq')
!   call WaitForAssert({-> assert_equal(12, term_getcursor(buf)[1])})
! 
!   call term_sendkeys(buf, "$\<C-V>$")
!   call WaitForAssert({-> assert_equal(13, term_getcursor(buf)[1])})
!   call term_sendkeys(buf, 'I')
!   call WaitForAssert({-> assert_equal(12, term_getcursor(buf)[1])})
! 
!   call term_sendkeys(buf, "\<Esc>$v$")
!   call WaitForAssert({-> assert_equal(13, term_getcursor(buf)[1])})
!   call term_sendkeys(buf, 's')
!   call WaitForAssert({-> assert_equal(12, term_getcursor(buf)[1])})
    call VerifyScreenDump(buf, 'Test_linebreak_reset_restore_1', {})
  
+   " clean up
    call term_sendkeys(buf, "\<Esc>")
    call StopVimInTerminal(buf)
  endfunc
*** ../vim-9.0.0701/src/testdir/test_visual.vim 2022-10-08 16:41:09.379815330 
+0100
--- src/testdir/test_visual.vim 2022-10-09 11:40:01.901620790 +0100
***************
*** 1501,1537 ****
    exe 'bwipe!' buf2
  endfunc
  
- " Test that cursor is drawn at correct position after an operator in Visual
- " mode when 'linebreak' and 'showcmd' are enabled.
- func Test_visual_operator_with_linebreak()
-   CheckRunVimInTerminal
- 
-   let lines =<< trim END
-     set linebreak showcmd noshowmode
-     call setline(1, repeat('a', &columns - 10) .. ' bbbbbbbbbb c')
-   END
-   call writefile(lines, 'XTest_visual_op_linebreak', 'D')
- 
-   let buf = RunVimInTerminal('-S XTest_visual_op_linebreak', {'rows': 6})
- 
-   call term_sendkeys(buf, '$v$')
-   call WaitForAssert({-> assert_equal(13, term_getcursor(buf)[1])})
-   call term_sendkeys(buf, 'zo')
-   call WaitForAssert({-> assert_equal(12, term_getcursor(buf)[1])})
- 
-   call term_sendkeys(buf, "$\<C-V>$")
-   call WaitForAssert({-> assert_equal(13, term_getcursor(buf)[1])})
-   call term_sendkeys(buf, 'I')
-   call WaitForAssert({-> assert_equal(12, term_getcursor(buf)[1])})
- 
-   call term_sendkeys(buf, "\<Esc>$v$")
-   call WaitForAssert({-> assert_equal(13, term_getcursor(buf)[1])})
-   call term_sendkeys(buf, 's')
-   call WaitForAssert({-> assert_equal(12, term_getcursor(buf)[1])})
- 
-   " clean up
-   call term_sendkeys(buf, "\<Esc>")
-   call StopVimInTerminal(buf)
- endfunc
- 
  " vim: shiftwidth=2 sts=2 expandtab
--- 1501,1504 ----
*** ../vim-9.0.0701/src/testdir/dumps/Test_linebreak_reset_restore_1.dump       
2022-10-08 16:41:09.379815330 +0100
--- src/testdir/dumps/Test_linebreak_reset_restore_1.dump       2022-10-09 
11:40:01.901620790 +0100
***************
*** 5,8 ****
  |~| @73
  |~| @73
  |~| @73
! | +0#0000000&@56|1|,|7|8|-|8|7| @6|A|l@1| 
--- 5,8 ----
  |~| @73
  |~| @73
  |~| @73
! |E+0#ffffff16#e000002|4|9|0|:| |N|o| |f|o|l|d| |f|o|u|n|d| 
+0#0000000#ffffff0@37|1|,|7|8|-|8|7| @6|A|l@1| 
*** ../vim-9.0.0701/src/version.c       2022-10-08 21:13:16.636848887 +0100
--- src/version.c       2022-10-09 11:42:55.821286536 +0100
***************
*** 701,702 ****
--- 701,704 ----
  {   /* Add new patch number below this line */
+ /**/
+     702,
  /**/

-- 
Q: How does a UNIX Guru do Sex ?
A: unzip;strip;touch;finger;mount;fsck;more;yes;umount;sleep

 /// 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/20221009104514.891F51C0D13%40moolenaar.net.

Raspunde prin e-mail lui