aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-13 12:25:01 +0800
committerGitHub <noreply@github.com>2022-08-13 12:25:01 +0800
commit1de62b9ea17b08db0fe37caf1f054b7b809120c3 (patch)
tree105f42dd76f70722032b9e343dd2226459ac84ae /src/nvim/testdir
parent754892e59dc3ab65a92d22f315e88b716bc26d1d (diff)
downloadrneovim-1de62b9ea17b08db0fe37caf1f054b7b809120c3.tar.gz
rneovim-1de62b9ea17b08db0fe37caf1f054b7b809120c3.tar.bz2
rneovim-1de62b9ea17b08db0fe37caf1f054b7b809120c3.zip
fix(charclass): make behavior with empty str match latest Vim (#19749)
Later Vim patches changed to return 0 for empty string and null string. Also update setcellwidth() docs to match latest Vim.
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_functions.vim2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index e0e0c1ca38..44b6f0373e 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -1774,6 +1774,8 @@ func Test_charclass()
call assert_equal(1, charclass('.'))
call assert_equal(2, charclass('x'))
call assert_equal(3, charclass("\u203c"))
+ " this used to crash vim
+ call assert_equal(0, "xxx"[-1]->charclass())
endfunc
func Test_eventhandler()