aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_marks.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-03-13 14:12:38 +0100
committerGitHub <noreply@github.com>2017-03-13 14:12:38 +0100
commit33d063752182c8dca60ad0bddaaa12a6669eb70b (patch)
tree4d19b148b4ef692b8c1045f78a5fe3b88c6427ff /src/nvim/testdir/test_marks.vim
parent3f555cce3de595902cd003cfca008563bc8ff8da (diff)
parent76829898bdcbf7f19ea2c6099c45c414510c6a38 (diff)
downloadrneovim-33d063752182c8dca60ad0bddaaa12a6669eb70b.tar.gz
rneovim-33d063752182c8dca60ad0bddaaa12a6669eb70b.tar.bz2
rneovim-33d063752182c8dca60ad0bddaaa12a6669eb70b.zip
Merge #6268 from lonerover/vim-7.4.2208
vim-patch: 7.4.2208,7.4.2305
Diffstat (limited to 'src/nvim/testdir/test_marks.vim')
-rw-r--r--src/nvim/testdir/test_marks.vim26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_marks.vim b/src/nvim/testdir/test_marks.vim
new file mode 100644
index 0000000000..d00b1ddc88
--- /dev/null
+++ b/src/nvim/testdir/test_marks.vim
@@ -0,0 +1,26 @@
+
+" Test that a deleted mark is restored after delete-undo-redo-undo.
+function! Test_Restore_DelMark()
+ enew!
+ call append(0, [" textline A", " textline B", " textline C"])
+ normal! 2gg
+ set nocp viminfo+=nviminfo
+ exe "normal! i\<C-G>u\<Esc>"
+ exe "normal! maddu\<C-R>u"
+ let pos = getpos("'a")
+ call assert_equal(2, pos[1])
+ call assert_equal(1, pos[2])
+ enew!
+endfunction
+
+" Test that CTRL-A and CTRL-X updates last changed mark '[, '].
+function! Test_Incr_Marks()
+ enew!
+ call append(0, ["123 123 123", "123 123 123", "123 123 123"])
+ normal! gg
+ execute "normal! \<C-A>`[v`]rAjwvjw\<C-X>`[v`]rX"
+ call assert_equal("AAA 123 123", getline(1))
+ call assert_equal("123 XXXXXXX", getline(2))
+ call assert_equal("XXX 123 123", getline(3))
+ enew!
+endfunction