vim-patch:8.2.3580: gj does not move properly with a wide character

Problem:    gj does not move properly with a wide character.
Solution:   Move one to the right. (Christian Brabandt, closes vim/vim#8702)
aaec1d4fb1
This commit is contained in:
zeertzjq
2021-12-27 11:49:22 +08:00
parent fcf5dd34fd
commit 176df92bd7
2 changed files with 20 additions and 1 deletions

View File

@@ -2759,4 +2759,16 @@ func Test_normal_count_after_operator()
bw!
endfunc
func Test_normal_gj_on_extra_wide_char()
new | 25vsp
let text='1 foooooooo ar e inszwe1 foooooooo inszwei' .
\ ' i drei vier fünf sechs sieben acht un zehn elf zwöfl' .
\ ' dreizehn v ierzehn fünfzehn'
put =text
call cursor(2,1)
norm! gj
call assert_equal([0,2,25,0], getpos('.'))
bw!
endfunc
" vim: shiftwidth=2 sts=2 expandtab