view src/testdir/test_marks.in @ 7570:4250ecde6009 v7.4.1085

commit https://github.com/vim/vim/commit/a52dfaed104183c1fa2a3b6e4430b23d86bcbece Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 10 20:21:57 2016 +0100 patch 7.4.1085 Problem: The CTRL-A and CTRL-X commands do not update the '[ and '] marks. Solution: (Yukihiro Nakadaira)
author Christian Brabandt <cb@256bit.org>
date Sun, 10 Jan 2016 20:30:04 +0100
parents 3c312e259c79
children
line wrap: on
line source

Tests for marks.

STARTTEST
:so small.vim
:" test that a deleted mark is restored after delete-undo-redo-undo
:/^\t/+1
:set nocp viminfo+=nviminfo
madduu
:let a = string(getpos("'a"))
:$put ='Mark after delete-undo-redo-undo: '.a
:''
ENDTEST

	textline A
	textline B
	textline C

STARTTEST
:" test that CTRL-A and CTRL-X updates last changed mark '[, '].
:/^123/
:execute "normal! \<C-A>`[v`]rAjwvjw\<C-X>`[v`]rX"
ENDTEST

CTRL-A CTRL-X:
123 123 123
123 123 123
123 123 123

STARTTEST
:g/^STARTTEST/.,/^ENDTEST/d
:wq! test.out
ENDTEST

Results: