mirror of
https://github.com/neovim/neovim.git
synced 2026-08-14 03:04:54 +00:00
vim-patch:9.2.0927: curswant not set on 8g8 (#41255)
Problem: curswant not set on 8g8
Solution: Set curswant, adjust tests (Emilien Breton)
closes: vim/vim#20979
7fe5cb35f9
Co-authored-by: Emilien Breton <bricktech2000@gmail.com>
This commit is contained in:
@@ -2135,6 +2135,7 @@ void utf_find_illegal(void)
|
||||
curwin->w_cursor.col += l;
|
||||
}
|
||||
}
|
||||
curwin->w_set_curswant = true;
|
||||
goto theend;
|
||||
}
|
||||
p += len;
|
||||
|
||||
@@ -2909,7 +2909,7 @@ func Test_normal_8g8()
|
||||
" With invalid byte.
|
||||
call setline(1, "___\xff___")
|
||||
norm! 1G08g8g
|
||||
call assert_equal([0, 1, 4, 0, 1], getcurpos())
|
||||
call assert_equal([0, 1, 4, 0, 4], getcurpos())
|
||||
|
||||
" With invalid byte before the cursor.
|
||||
call setline(1, "___\xff___")
|
||||
@@ -2919,12 +2919,12 @@ func Test_normal_8g8()
|
||||
" With truncated sequence.
|
||||
call setline(1, "___\xE2\x82___")
|
||||
norm! 1G08g8g
|
||||
call assert_equal([0, 1, 4, 0, 1], getcurpos())
|
||||
call assert_equal([0, 1, 4, 0, 4], getcurpos())
|
||||
|
||||
" With overlong sequence.
|
||||
call setline(1, "___\xF0\x82\x82\xAC___")
|
||||
norm! 1G08g8g
|
||||
call assert_equal([0, 1, 4, 0, 1], getcurpos())
|
||||
call assert_equal([0, 1, 4, 0, 4], getcurpos())
|
||||
|
||||
" With valid utf8.
|
||||
call setline(1, "café")
|
||||
|
||||
Reference in New Issue
Block a user