-*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
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)
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
set smoothscroll&
bw!
+ call prop_type_delete(vt)
endfunc
" vim: shiftwidth=2 sts=2 expandtab nofoldenable
let &mouse = save_mouse
let &term = save_term
let &ttymouse = save_ttymouse
+ bwipe!
endfunc
" this was dividing by zero
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>"
exe "norm! \<C-U>"
call assert_equal(0, winsaveview().skipcol)
- set smoothscroll&
+ bwipe!
endfunc
" vim: shiftwidth=2 sts=2 expandtab