mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:9.1.0228: Two unrelated things are tested by a single test (#28093)
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: vim/vim#14323
ad493ef3ea
This commit is contained in:
parent
b1615a35f0
commit
d223a7cbd2
@ -5693,8 +5693,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
highlighted with |hl-NonText|.
|
highlighted with |hl-NonText|.
|
||||||
You may also want to add "lastline" to the 'display' option to show as
|
You may also want to add "lastline" to the 'display' option to show as
|
||||||
much of the last line as possible.
|
much of the last line as possible.
|
||||||
NOTE: only partly implemented, currently works with CTRL-E, CTRL-Y,
|
NOTE: partly implemented, doesn't work yet for |gj| and |gk|.
|
||||||
CTRL-D, CTRL-U, CTRL-F, CTRL-B and scrolling with the mouse.
|
|
||||||
|
|
||||||
*'softtabstop'* *'sts'*
|
*'softtabstop'* *'sts'*
|
||||||
'softtabstop' 'sts' number (default 0)
|
'softtabstop' 'sts' number (default 0)
|
||||||
|
3
runtime/lua/vim/_meta/options.lua
generated
3
runtime/lua/vim/_meta/options.lua
generated
@ -6075,8 +6075,7 @@ vim.go.sta = vim.go.smarttab
|
|||||||
--- highlighted with `hl-NonText`.
|
--- highlighted with `hl-NonText`.
|
||||||
--- You may also want to add "lastline" to the 'display' option to show as
|
--- You may also want to add "lastline" to the 'display' option to show as
|
||||||
--- much of the last line as possible.
|
--- much of the last line as possible.
|
||||||
--- NOTE: only partly implemented, currently works with CTRL-E, CTRL-Y,
|
--- NOTE: partly implemented, doesn't work yet for `gj` and `gk`.
|
||||||
--- CTRL-D, CTRL-U, CTRL-F, CTRL-B and scrolling with the mouse.
|
|
||||||
---
|
---
|
||||||
--- @type boolean
|
--- @type boolean
|
||||||
vim.o.smoothscroll = false
|
vim.o.smoothscroll = false
|
||||||
|
@ -7663,8 +7663,7 @@ return {
|
|||||||
highlighted with |hl-NonText|.
|
highlighted with |hl-NonText|.
|
||||||
You may also want to add "lastline" to the 'display' option to show as
|
You may also want to add "lastline" to the 'display' option to show as
|
||||||
much of the last line as possible.
|
much of the last line as possible.
|
||||||
NOTE: only partly implemented, currently works with CTRL-E, CTRL-Y,
|
NOTE: partly implemented, doesn't work yet for |gj| and |gk|.
|
||||||
CTRL-D, CTRL-U, CTRL-F, CTRL-B and scrolling with the mouse.
|
|
||||||
]=],
|
]=],
|
||||||
full_name = 'smoothscroll',
|
full_name = 'smoothscroll',
|
||||||
pv_name = 'p_sms',
|
pv_name = 'p_sms',
|
||||||
|
@ -4184,7 +4184,20 @@ func Test_normal34_zet_large()
|
|||||||
norm! z9765405999999999999
|
norm! z9765405999999999999
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for { and } paragraph movements and Ctrl-B in buffer with a single line
|
" Test for { and } paragraph movements in a single line
|
||||||
|
func Test_brace_single_line()
|
||||||
|
new
|
||||||
|
call setline(1, ['foobar one two three'])
|
||||||
|
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()
|
func Test_single_line_scroll()
|
||||||
CheckFeature textprop
|
CheckFeature textprop
|
||||||
|
|
||||||
@ -4193,12 +4206,7 @@ func Test_single_line_scroll()
|
|||||||
let vt = 'virt_above'
|
let vt = 'virt_above'
|
||||||
call prop_type_add(vt, {'highlight': 'IncSearch'})
|
call prop_type_add(vt, {'highlight': 'IncSearch'})
|
||||||
call prop_add(1, 0, {'type': vt, 'text': '---', 'text_align': 'above'})
|
call prop_add(1, 0, {'type': vt, 'text': '---', 'text_align': 'above'})
|
||||||
1
|
call cursor(1, 1)
|
||||||
norm! 0}
|
|
||||||
|
|
||||||
call assert_equal([0, 1, 20, 0], getpos('.'))
|
|
||||||
norm! {
|
|
||||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
|
||||||
|
|
||||||
" Ctrl-B/Ctrl-U scroll up with hidden "above" virtual text.
|
" Ctrl-B/Ctrl-U scroll up with hidden "above" virtual text.
|
||||||
set smoothscroll
|
set smoothscroll
|
||||||
@ -4213,6 +4221,7 @@ func Test_single_line_scroll()
|
|||||||
|
|
||||||
set smoothscroll&
|
set smoothscroll&
|
||||||
bw!
|
bw!
|
||||||
|
call prop_type_delete(vt)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab nofoldenable
|
" vim: shiftwidth=2 sts=2 expandtab nofoldenable
|
||||||
|
@ -741,6 +741,7 @@ func Test_smoothscroll_mouse_pos()
|
|||||||
let &mouse = save_mouse
|
let &mouse = save_mouse
|
||||||
"let &term = save_term
|
"let &term = save_term
|
||||||
"let &ttymouse = save_ttymouse
|
"let &ttymouse = save_ttymouse
|
||||||
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" this was dividing by zero
|
" this was dividing by zero
|
||||||
@ -1002,9 +1003,8 @@ func Test_smoothscroll_textoff_small_winwidth()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_smoothscroll_page()
|
func Test_smoothscroll_page()
|
||||||
set smoothscroll
|
call NewWindow(10, 40)
|
||||||
|
setlocal smoothscroll
|
||||||
10split | 40vsplit
|
|
||||||
call setline(1, 'abcde '->repeat(150))
|
call setline(1, 'abcde '->repeat(150))
|
||||||
|
|
||||||
exe "norm! \<C-F>"
|
exe "norm! \<C-F>"
|
||||||
@ -1041,7 +1041,7 @@ func Test_smoothscroll_page()
|
|||||||
exe "norm! \<C-U>"
|
exe "norm! \<C-U>"
|
||||||
call assert_equal(0, winsaveview().skipcol)
|
call assert_equal(0, winsaveview().skipcol)
|
||||||
|
|
||||||
set smoothscroll&
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
Loading…
Reference in New Issue
Block a user