comparison src/testdir/test_options.vim @ 33690:09d88190c05c v9.0.2081

patch 9.0.2081: smoothscroll may result in wrong cursor position Commit: https://github.com/vim/vim/commit/1bf1bf569b96d2f9b28e0cce0968ffbf2fb80aac Author: Luuk van Baal <luukvbaal@gmail.com> Date: Sat Oct 28 21:43:31 2023 +0200 patch 9.0.2081: smoothscroll may result in wrong cursor position Problem: With 'smoothscroll' set, "w_skipcol" is not reset when unsetting 'wrap'. Resulting in incorrect calculation of the cursor position. Solution: Reset "w_skipcol" when unsetting 'wrap'. fixes: #12970 closes: #13439 Signed-off-by: Luuk van Baal <luukvbaal@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sat, 28 Oct 2023 22:00:04 +0200
parents e628d7f03758
children 7777043c9393
comparison
equal deleted inserted replaced
33689:9e9aebc5f971 33690:09d88190c05c
2205 set keyprotocol+=ansi:kitty 2205 set keyprotocol+=ansi:kitty
2206 call assert_equal("\<Esc>[=1;1u", &t_TI) 2206 call assert_equal("\<Esc>[=1;1u", &t_TI)
2207 let &term = term 2207 let &term = term
2208 endfunc 2208 endfunc
2209 2209
2210 func Test_set_wrap()
2211 " Unsetting 'wrap' when 'smoothscroll' is set does not result in incorrect
2212 " cursor position.
2213 set wrap smoothscroll scrolloff=5
2214
2215 call setline(1, ['', 'aaaa'->repeat(500)])
2216 20 split
2217 20 vsplit
2218 norm 2G$
2219 redraw
2220 set nowrap
2221 call assert_equal(2, winline())
2222
2223 set wrap& smoothscroll& scrolloff&
2224 endfunc
2225
2210 " vim: shiftwidth=2 sts=2 expandtab 2226 " vim: shiftwidth=2 sts=2 expandtab