diff options
author | KunMing Xie <qqzz014@gmail.com> | 2018-02-21 04:44:37 +0800 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-02-20 21:44:37 +0100 |
commit | ec02d9aad6b3015b1802476521a65234c70b0574 (patch) | |
tree | b6f140ea6dd0032bdcfc6cec50e6dd68cf1127ce | |
parent | c57d31596370e12a3e2019468ea6cefecf69449e (diff) | |
download | rneovim-ec02d9aad6b3015b1802476521a65234c70b0574.tar.gz rneovim-ec02d9aad6b3015b1802476521a65234c70b0574.tar.bz2 rneovim-ec02d9aad6b3015b1802476521a65234c70b0574.zip |
vim-patch:8.0.0222: blockwise put on multi-byte char (#8030)
Note: code change was covered by c2a18216114bae75b6d6a2c7f1a68db04578abce
Problem: When a multi-byte character ends in a zero byte, putting blockwise
text puts it before the character instead of after it.
Solution: Use int instead of char for the character under the cursor.
(Luchr, closes vim/vim#1403) Add a test.
https://github.com/vim/vim/commit/c81299684b2b9045e56525d3da3f45e8440fbf0d
-rw-r--r-- | src/nvim/testdir/Makefile | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_alot.vim | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_put.vim | 12 |
3 files changed, 14 insertions, 0 deletions
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index 211ee974fb..418463a0ad 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -87,6 +87,7 @@ NEW_TESTS ?= \ test_number.res \ test_options.res \ test_profile.res \ + test_put.res \ test_quickfix.res \ test_recover.res \ test_retab.res \ diff --git a/src/nvim/testdir/test_alot.vim b/src/nvim/testdir/test_alot.vim index 9bf6df3251..b4baf7a8d7 100644 --- a/src/nvim/testdir/test_alot.vim +++ b/src/nvim/testdir/test_alot.vim @@ -24,6 +24,7 @@ source test_mapping.vim source test_messages.vim source test_partial.vim source test_popup.vim +source test_put.vim source test_recover.vim source test_regexp_utf8.vim source test_source_utf8.vim diff --git a/src/nvim/testdir/test_put.vim b/src/nvim/testdir/test_put.vim new file mode 100644 index 0000000000..612bdabb6c --- /dev/null +++ b/src/nvim/testdir/test_put.vim @@ -0,0 +1,12 @@ + +func Test_put_block() + if !has('multi_byte') + return + endif + new + call feedkeys("i\<C-V>u2500\<CR>x\<ESC>", 'x') + call feedkeys("\<C-V>y", 'x') + call feedkeys("gg0p", 'x') + call assert_equal("\u2500x", getline(1)) + bwipe! +endfunc |