annotate src/testdir/test_visual.vim @ 10494:1e700d72561d v8.0.0140

commit https://github.com/vim/vim/commit/f8eb9c51e5bbd10e59c9b1247f8f6c7f5b77ccd0 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 2 17:31:24 2017 +0100 patch 8.0.0140 Problem: Pasting inserted text in Visual mode does not work properly. (Matthew Malcomson) Solution: Stop Visual mode before stuffing the inserted text. (Christian Brabandt, from neovim #5709)
author Christian Brabandt <cb@256bit.org>
date Mon, 02 Jan 2017 17:45:04 +0100
parents 81ba6e4eb72b
children 065da86ca6d2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10494
1e700d72561d commit https://github.com/vim/vim/commit/f8eb9c51e5bbd10e59c9b1247f8f6c7f5b77ccd0
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
1 " Tests for various Visual mode.
8401
98955c2ffd9f commit https://github.com/vim/vim/commit/019b9c644e92742e37efc08fef47c2620a01b6b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 if !has('visual')
98955c2ffd9f commit https://github.com/vim/vim/commit/019b9c644e92742e37efc08fef47c2620a01b6b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 finish
98955c2ffd9f commit https://github.com/vim/vim/commit/019b9c644e92742e37efc08fef47c2620a01b6b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 endif
98955c2ffd9f commit https://github.com/vim/vim/commit/019b9c644e92742e37efc08fef47c2620a01b6b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5
98955c2ffd9f commit https://github.com/vim/vim/commit/019b9c644e92742e37efc08fef47c2620a01b6b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 func Test_block_shift_multibyte()
10494
1e700d72561d commit https://github.com/vim/vim/commit/f8eb9c51e5bbd10e59c9b1247f8f6c7f5b77ccd0
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
7 " Uses double-wide character.
1e700d72561d commit https://github.com/vim/vim/commit/f8eb9c51e5bbd10e59c9b1247f8f6c7f5b77ccd0
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
8 if !has('multi_byte')
1e700d72561d commit https://github.com/vim/vim/commit/f8eb9c51e5bbd10e59c9b1247f8f6c7f5b77ccd0
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
9 return
1e700d72561d commit https://github.com/vim/vim/commit/f8eb9c51e5bbd10e59c9b1247f8f6c7f5b77ccd0
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
10 endif
8401
98955c2ffd9f commit https://github.com/vim/vim/commit/019b9c644e92742e37efc08fef47c2620a01b6b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 split
98955c2ffd9f commit https://github.com/vim/vim/commit/019b9c644e92742e37efc08fef47c2620a01b6b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 call setline(1, ['xヹxxx', 'ヹxxx'])
98955c2ffd9f commit https://github.com/vim/vim/commit/019b9c644e92742e37efc08fef47c2620a01b6b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 exe "normal 1G0l\<C-V>jl>"
98955c2ffd9f commit https://github.com/vim/vim/commit/019b9c644e92742e37efc08fef47c2620a01b6b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 call assert_equal('x ヹxxx', getline(1))
98955c2ffd9f commit https://github.com/vim/vim/commit/019b9c644e92742e37efc08fef47c2620a01b6b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 call assert_equal(' ヹxxx', getline(2))
98955c2ffd9f commit https://github.com/vim/vim/commit/019b9c644e92742e37efc08fef47c2620a01b6b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 q!
98955c2ffd9f commit https://github.com/vim/vim/commit/019b9c644e92742e37efc08fef47c2620a01b6b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 endfunc
10494
1e700d72561d commit https://github.com/vim/vim/commit/f8eb9c51e5bbd10e59c9b1247f8f6c7f5b77ccd0
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
18
1e700d72561d commit https://github.com/vim/vim/commit/f8eb9c51e5bbd10e59c9b1247f8f6c7f5b77ccd0
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
19 func Test_dotregister_paste()
1e700d72561d commit https://github.com/vim/vim/commit/f8eb9c51e5bbd10e59c9b1247f8f6c7f5b77ccd0
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
20 new
1e700d72561d commit https://github.com/vim/vim/commit/f8eb9c51e5bbd10e59c9b1247f8f6c7f5b77ccd0
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
21 exe "norm! ihello world\<esc>"
1e700d72561d commit https://github.com/vim/vim/commit/f8eb9c51e5bbd10e59c9b1247f8f6c7f5b77ccd0
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
22 norm! 0ve".p
1e700d72561d commit https://github.com/vim/vim/commit/f8eb9c51e5bbd10e59c9b1247f8f6c7f5b77ccd0
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
23 call assert_equal('hello world world', getline(1))
1e700d72561d commit https://github.com/vim/vim/commit/f8eb9c51e5bbd10e59c9b1247f8f6c7f5b77ccd0
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
24 q!
1e700d72561d commit https://github.com/vim/vim/commit/f8eb9c51e5bbd10e59c9b1247f8f6c7f5b77ccd0
Christian Brabandt <cb@256bit.org>
parents: 9618
diff changeset
25 endfunc