view src/testdir/test69.in @ 18469:66964658cc3c v8.1.2228

patch 8.1.2228: screenpos() returns wrong values when 'number' is set Commit: https://github.com/vim/vim/commit/38ba4dce4a8574e60f6ddb111922880b0c7affdc Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 27 21:39:09 2019 +0100 patch 8.1.2228: screenpos() returns wrong values when 'number' is set Problem: screenpos() returns wrong values when 'number' is set. (Ben Jackson) Solution: Compare the column with the window width. (closes #5133)
author Bram Moolenaar <Bram@vim.org>
date Sun, 27 Oct 2019 21:45:03 +0100
parents 1090d6637cfd
children
line wrap: on
line source

Test for multi-byte text formatting.
Also test, that 'mps' with multibyte chars works.
And test "ra" on multi-byte characters.
Also test byteidx() and byteidxcomp()

STARTTEST
:so mbyte.vim
:set encoding=utf-8
ENDTEST

Results of test69:

STARTTEST
/^{/+1
:set tw=2 fo=t
gqgqjgqgqo
XYZ
abc XYZ
ENDTEST

{
XYZ
abc XYZ
}

STARTTEST
/^{/+1
:set tw=1 fo=tm
gqgqjgqgqjgqgqjgqgqjgqgqo

Xa
X a
XY
X Y
ENDTEST

{

Xa
X a
XY
X Y
}

STARTTEST
/^{/+1
:set tw=2 fo=tm
gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo

Xa
X a
XY
X Y
aX
abX
abcX
abX c
abXY
ENDTEST

{

Xa
X a
XY
X Y
aX
abX
abcX
abX c
abXY
}

STARTTEST
/^{/+1
:set ai tw=2 fo=tm
gqgqjgqgqo

Xa
ENDTEST

{

  Xa
}

STARTTEST
/^{/+1
:set noai tw=2 fo=tm
gqgqjgqgqo

  Xa
ENDTEST

{

  Xa
}

STARTTEST
/^{/+1
:set tw=2 fo=cqm comments=n:X
gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo

Xa
XaY
XY
XYZ
X Y
X YZ
XX
XXa
XXY
ENDTEST

{

Xa
XaY
XY
XYZ
X Y
X YZ
XX
XXa
XXY
}

STARTTEST
/^{/+1
:set tw=2 fo=tm
RXa
ENDTEST

{

}

STARTTEST
/^{/+1
:set mps+=u2018:u2019
d%
ENDTEST

{
‘ two three ’ four
}
STARTTEST
/^ra test
jVjra
ENDTEST

ra test
abba
aab

STARTTEST
:set whichwrap+=h
/^x
dh
:set whichwrap-=h
ENDTEST

á
x

STARTTEST
/^substitute
:let y = substitute('123', '\zs', 'a', 'g')    | put =y
ENDTEST

substitute

STARTTEST
:g/^STARTTEST/.,/^ENDTEST/d
:1;/^Results/,$wq! test.out
ENDTEST