aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-03-07 22:11:26 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-03-07 22:28:30 -0500
commit72e304c3497c0286dca4fd87314abc0d0a1f43a5 (patch)
treef6b60f47a244a4f58079c8eafcc6254d300507aa /src/nvim/testdir
parent5f84b1dc4154ea8def87b6113fa9b9ed058d83d2 (diff)
downloadrneovim-72e304c3497c0286dca4fd87314abc0d0a1f43a5.tar.gz
rneovim-72e304c3497c0286dca4fd87314abc0d0a1f43a5.tar.bz2
rneovim-72e304c3497c0286dca4fd87314abc0d0a1f43a5.zip
vim-patch:8.1.0998: getcurpos() unexpectedly changes "curswant"
Problem: getcurpos() unexpectedly changes "curswant". Solution: Save and restore "curswant". (closes vim/vim#4069) https://github.com/vim/vim/commit/19a66858a5e3fedadc371321834507c34e2dfb18
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_visual.vim15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_visual.vim b/src/nvim/testdir/test_visual.vim
index 4a143d665d..9e32f217ad 100644
--- a/src/nvim/testdir/test_visual.vim
+++ b/src/nvim/testdir/test_visual.vim
@@ -1,8 +1,4 @@
" Tests for various Visual mode.
-if !has('visual')
- finish
-endif
-
func Test_block_shift_multibyte()
" Uses double-wide character.
@@ -318,3 +314,14 @@ func Test_Visual_sentence_textobject()
bwipe!
endfunc
+
+func Test_curswant_not_changed()
+ new
+ call setline(1, ['one', 'two'])
+ au InsertLeave * call getcurpos()
+ call feedkeys("gg0\<C-V>jI123 \<Esc>j", 'xt')
+ call assert_equal([0, 2, 1, 0, 1], getcurpos())
+
+ bwipe!
+ au! InsertLeave
+endfunc