]> granicus.if.org Git - vim/commitdiff
patch 8.2.2496: insufficien testing for text jumping fix v8.2.2496
authorBram Moolenaar <Bram@vim.org>
Wed, 10 Feb 2021 20:20:30 +0000 (21:20 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 10 Feb 2021 20:20:30 +0000 (21:20 +0100)
Problem:    Insufficien testing for text jumping fix.
Solution:   Add another test case.

src/testdir/test_breakindent.vim
src/version.c

index 98aff02aea1fd7a4a4ce651bd8e096f2e3da532c..bb0f6dd4a959c816fe72fb2dcb6e32370ab0aa32 100644 (file)
@@ -634,15 +634,20 @@ func Test_breakindent19_sbr_nextpage()
   call s:compare_lines(expect, lines)
   " Scroll down one screen line
   setl scrolloff=5
-  norm! 6gj
-  redraw!
+  norm! 5gj
   let lines = s:screen_lines(1, 20)
   let expect = [
-       \ "aaaaaaaaaaaaaaaaaa",
+       \ "aaaaaaaaaaaaaaaaaaaa",
        \ "> aaaaaaaaaaaaaaaaaa",
        \ "> aaaaaaaaaaaaaaaaaa",
        \ ]
   call s:compare_lines(expect, lines)
+  redraw!
+  " moving the cursor doesn't change the text offset
+  norm! l
+  redraw!
+  let lines = s:screen_lines(1, 20)
+  call s:compare_lines(expect, lines)
 
   setl breakindent briopt=min:18 sbr=>
   norm! 5gj
index 708fb95e5c91ae59eee1d4e865cb23acec503055..3c9edfdce9bd2d98e4f265eadbf17b39c7fe002e 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2496,
 /**/
     2495,
 /**/