Mercurial > vim
view src/testdir/test_charsearch_utf8.vim @ 34211:f9b706e23b10 v9.1.0054
patch 9.1.0054: 'linebreak' may still apply to leading whitespace
Commit: https://github.com/vim/vim/commit/703f9bc943a29d947869b5cb0370be2ac42d5ac9
Author: zeertzjq <zeertzjq@outlook.com>
Date: Thu Jan 25 21:27:13 2024 +0100
patch 9.1.0054: 'linebreak' may still apply to leading whitespace
Problem: 'linebreak' may still apply to leading whitespace
(VanaIgr)
Solution: Compare pointers instead of virtual columns.
(zeertzjq)
related: neovim/neovim#27180
closes: #13915
Co-authored-by: VanaIgr <vanaigranov@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 25 Jan 2024 21:45:02 +0100 |
parents | 695b50472e85 |
children |
line wrap: on
line source
" Tests for related f{char} and t{char} using utf-8. " Test for t,f,F,T movement commands func Test_search_cmds() new! call setline(1, "・最初から最後まで最強のVimは最高") 1 normal! f最 call assert_equal([0, 1, 4, 0], getpos('.')) normal! ; call assert_equal([0, 1, 16, 0], getpos('.')) normal! 2; call assert_equal([0, 1, 43, 0], getpos('.')) normal! , call assert_equal([0, 1, 28, 0], getpos('.')) call assert_equal('最', getcharsearch().char) call setcharsearch({'char' : ''}) call assert_equal('', getcharsearch().char) call assert_beeps('normal ;') call assert_equal([0, 1, 28, 0], getpos('.')) call assert_beeps('normal ,') call assert_equal([0, 1, 28, 0], getpos('.')) bw! endfunc " vim: shiftwidth=2 sts=2 expandtab