]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0228: Two unrelated things are tested by a single test v9.1.0228
authorzeertzjq <zeertzjq@outlook.com>
Fri, 29 Mar 2024 09:23:19 +0000 (10:23 +0100)
committerChristian Brabandt <cb@256bit.org>
Fri, 29 Mar 2024 09:25:52 +0000 (10:25 +0100)
Problem:  Two unrelated things are tested by a single test.
Solution: Split it into two, restoring the old Test_brace_single_line().
          Add missing cleanup to some tests.
          (zeertzjq)

closes: #14323

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/options.txt
src/testdir/test_normal.vim
src/testdir/test_scroll_opt.vim
src/version.c

index 4eaedc250c1f0af23f8624579de4d84ed36241f0..806f5f0b80dbe81e164c8c80acc3fd165183a44b 100644 (file)
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 9.1.  Last change: 2024 Mar 28
+*options.txt*  For Vim version 9.1.  Last change: 2024 Mar 29
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -7502,8 +7502,7 @@ A jump table for the options with a short description can be found at |Q_op|.
        highlighted with |hl-NonText|.
        You may also want to add "lastline" to the 'display' option to show as
        much of the last line as possible.
-       NOTE: only partly implemented, currently works with CTRL-E, CTRL-Y,
-       CTRL-D, CTRL-U, CTRL-F, CTRL-B and scrolling with the mouse.
+       NOTE: partly implemented, doesn't work yet for |gj| and |gk|.
 
                                        *'softtabstop'* *'sts'*
 'softtabstop' 'sts'    number  (default 0)
index 3a7248fd082dc1611c82b876a073468ca0fb36fd..14440fb6929727b705e646c61b856ffc5e7709b0 100644 (file)
@@ -4174,21 +4174,29 @@ func Test_normal34_zet_large()
   norm! z9765405999999999999
 endfunc
 
-" Test for { and } paragraph movements and Ctrl-B in buffer with a single line
-func Test_single_line_scroll()
-  CheckFeature textprop
-
+" Test for { and } paragraph movements in a single line
+func Test_brace_single_line()
   new
   call setline(1, ['foobar one two three'])
-  let vt = 'virt_above'
-  call prop_type_add(vt, {'highlight': 'IncSearch'})
-  call prop_add(1, 0, {'type': vt, 'text': '---', 'text_align': 'above'})
   1
   norm! 0}
 
   call assert_equal([0, 1, 20, 0], getpos('.'))
   norm! {
   call assert_equal([0, 1, 1, 0], getpos('.'))
+  bw!
+endfunc
+
+" Test for Ctrl-B/Ctrl-U in buffer with a single line
+func Test_single_line_scroll()
+  CheckFeature textprop
+
+  new
+  call setline(1, ['foobar one two three'])
+  let vt = 'virt_above'
+  call prop_type_add(vt, {'highlight': 'IncSearch'})
+  call prop_add(1, 0, {'type': vt, 'text': '---', 'text_align': 'above'})
+  call cursor(1, 1)
 
   " Ctrl-B/Ctrl-U scroll up with hidden "above" virtual text.
   set smoothscroll
@@ -4203,6 +4211,7 @@ func Test_single_line_scroll()
 
   set smoothscroll&
   bw!
+  call prop_type_delete(vt)
 endfunc
 
 " vim: shiftwidth=2 sts=2 expandtab nofoldenable
index 788870f876d3b50e817b4d1b5722bbbbb78904a4..d7a79076d12b3d6751f71ed001c1b20561bc941c 100644 (file)
@@ -738,6 +738,7 @@ func Test_smoothscroll_mouse_pos()
   let &mouse = save_mouse
   let &term = save_term
   let &ttymouse = save_ttymouse
+  bwipe!
 endfunc
 
 " this was dividing by zero
@@ -999,9 +1000,8 @@ func Test_smoothscroll_textoff_small_winwidth()
 endfunc
 
 func Test_smoothscroll_page()
-  set smoothscroll
-
-  10split | 40vsplit
+  call NewWindow(10, 40)
+  setlocal smoothscroll
   call setline(1, 'abcde '->repeat(150))
 
   exe "norm! \<C-F>"
@@ -1038,7 +1038,7 @@ func Test_smoothscroll_page()
   exe "norm! \<C-U>"
   call assert_equal(0, winsaveview().skipcol)
 
-  set smoothscroll&
+  bwipe!
 endfunc
 
 " vim: shiftwidth=2 sts=2 expandtab
index 7acc24d0d4bc6a7f79ce80a67a54465d02bd8d9c..2a996a142550bfe5911d9995abfc96a84a655cc9 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    228,
 /**/
     227,
 /**/