Mercurial > vim
annotate src/testdir/test_increment.vim @ 7593:87e607fb6853 v7.4.1096
commit https://github.com/vim/vim/commit/a260b87d9da17f605666630f18c1ed909c2b8bae
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jan 15 20:48:22 2016 +0100
patch 7.4.1096
Problem: Need several lines to verify a command produces an error.
Solution: Add assert_fails(). (suggested by Nikolay Pavlov)
Make the quickfix alloc test actually work.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 15 Jan 2016 21:00:06 +0100 |
parents | fdae4c496775 |
children | 2a34dd90beba |
rev | line source |
---|---|
7544
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Tests for using Ctrl-A/Ctrl-X on visual selections |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 func SetUp() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 new dummy |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 set nrformats&vim |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 func TearDown() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 bwipe! |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 " 1) Ctrl-A on visually selected number |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 " foobar-10 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 " 1) Ctrl-A on start of line: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 " foobar-9 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 " 2) Ctrl-A on visually selected "-10": |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 " foobar-9 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 " 3) Ctrl-A on visually selected "10": |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 " foobar-11 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 " 4) Ctrl-X on visually selected "-10" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 " foobar-11 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 " 5) Ctrl-X on visually selected "10" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 " foobar-9 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 func Test_visual_increment_01() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 call setline(1, repeat(["foobaar-10"], 5)) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 call cursor(1, 1) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 exec "norm! \<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 call assert_equal("foobaar-9", getline('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 call assert_equal([0, 1, 9, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 call cursor(2, 1) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 exec "norm! f-v$\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 call assert_equal("foobaar-9", getline('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 call assert_equal([0, 2, 8, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 call cursor(3, 1) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 exec "norm! f1v$\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
41 call assert_equal("foobaar-11", getline('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 call assert_equal([0, 3, 9, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 call cursor(4, 1) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
45 exec "norm! f-v$\<C-X>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
46 call assert_equal("foobaar-11", getline('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
47 call assert_equal([0, 4, 8, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
48 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
49 call cursor(5, 1) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
50 exec "norm! f1v$\<C-X>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
51 call assert_equal("foobaar-9", getline('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
52 call assert_equal([0, 5, 9, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
53 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
54 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
55 " 2) Ctrl-A on visually selected lines |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
56 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
57 " 10 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
58 " 20 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
59 " 30 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
60 " 40 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
61 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
62 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
63 " 1) Ctrl-A on visually selected lines: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
64 " 11 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
65 " 21 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
66 " 31 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
67 " 41 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
68 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
69 " 2) Ctrl-X on visually selected lines: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
70 " 9 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
71 " 19 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
72 " 29 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
73 " 39 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
74 func Test_visual_increment_02() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
75 call setline(1, ["10", "20", "30", "40"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
76 exec "norm! GV3k$\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
77 call assert_equal(["11", "21", "31", "41"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
78 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
79 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
80 call setline(1, ["10", "20", "30", "40"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
81 exec "norm! GV3k$\<C-X>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
82 call assert_equal(["9", "19", "29", "39"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
83 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
84 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
85 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
86 " 3) g Ctrl-A on visually selected lines, with non-numbers in between |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
87 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
88 " 10 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
89 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
90 " 20 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
91 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
92 " 30 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
93 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
94 " 40 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
95 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
96 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
97 " 1) 2 g Ctrl-A on visually selected lines: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
98 " 12 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
99 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
100 " 24 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
101 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
102 " 36 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
103 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
104 " 48 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
105 " 2) 2 g Ctrl-X on visually selected lines |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
106 " 8 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
107 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
108 " 16 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
109 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
110 " 24 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
111 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
112 " 32 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
113 func Test_visual_increment_03() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
114 call setline(1, ["10", "", "20", "", "30", "", "40"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
115 exec "norm! GV6k2g\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
116 call assert_equal(["12", "", "24", "", "36", "", "48"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
117 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
118 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
119 call setline(1, ["10", "", "20", "", "30", "", "40"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
120 exec "norm! GV6k2g\<C-X>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
121 call assert_equal(["8", "", "16", "", "24", "", "32"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
122 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
123 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
124 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
125 " 4) Ctrl-A on non-number |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
126 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
127 " foobar-10 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
128 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
129 " 1) visually select foobar: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
130 " foobar-10 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
131 func Test_visual_increment_04() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
132 call setline(1, ["foobar-10"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
133 exec "norm! vf-\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
134 call assert_equal(["foobar-10"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
135 " NOTE: I think this is correct behavior... |
7574
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
136 call assert_equal([0, 1, 1, 0], getpos('.')) |
7544
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
137 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
138 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
139 " 5) g<Ctrl-A> on letter |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
140 " Test: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
141 " a |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
142 " a |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
143 " a |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
144 " a |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
145 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
146 " 1) g Ctrl-A on visually selected lines |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
147 " b |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
148 " c |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
149 " d |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
150 " e |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
151 func Test_visual_increment_05() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
152 set nrformats+=alpha |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
153 call setline(1, repeat(["a"], 4)) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
154 exec "norm! GV3kg\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
155 call assert_equal(["b", "c", "d", "e"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
156 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
157 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
158 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
159 " 6) g<Ctrl-A> on letter |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
160 " Test: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
161 " z |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
162 " z |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
163 " z |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
164 " z |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
165 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
166 " 1) g Ctrl-X on visually selected lines |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
167 " y |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
168 " x |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
169 " w |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
170 " v |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
171 func Test_visual_increment_06() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
172 set nrformats+=alpha |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
173 call setline(1, repeat(["z"], 4)) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
174 exec "norm! GV3kg\<C-X>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
175 call assert_equal(["y", "x", "w", "v"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
176 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
177 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
178 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
179 " 7) <Ctrl-A> on letter |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
180 " Test: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
181 " 2 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
182 " 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
183 " 0 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
184 " -1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
185 " -2 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
186 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
187 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
188 " 1) Ctrl-A on visually selected lines |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
189 " 3 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
190 " 2 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
191 " 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
192 " 0 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
193 " -1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
194 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
195 " 2) Ctrl-X on visually selected lines |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
196 " 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
197 " 0 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
198 " -1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
199 " -2 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
200 " -3 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
201 func Test_visual_increment_07() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
202 call setline(1, ["2", "1", "0", "-1", "-2"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
203 exec "norm! GV4k\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
204 call assert_equal(["3", "2", "1", "0", "-1"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
205 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
206 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
207 call setline(1, ["2", "1", "0", "-1", "-2"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
208 exec "norm! GV4k\<C-X>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
209 call assert_equal(["1", "0", "-1", "-2", "-3"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
210 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
211 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
212 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
213 " 8) Block increment on 0x9 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
214 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
215 " 0x9 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
216 " 0x9 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
217 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
218 " 1) Ctrl-A on visually block selected region (cursor at beginning): |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
219 " 0xa |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
220 " 0xa |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
221 " 2) Ctrl-A on visually block selected region (cursor at end) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
222 " 0xa |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
223 " 0xa |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
224 func Test_visual_increment_08() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
225 call setline(1, repeat(["0x9"], 2)) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
226 exec "norm! \<C-V>j$\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
227 call assert_equal(["0xa", "0xa"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
228 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
229 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
230 call setline(1, repeat(["0x9"], 2)) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
231 exec "norm! gg$\<C-V>+\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
232 call assert_equal(["0xa", "0xa"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
233 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
234 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
235 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
236 " 9) Increment and redo |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
237 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
238 " 2 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
239 " 2 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
240 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
241 " 3 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
242 " 3 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
243 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
244 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
245 " 1) 2 Ctrl-A on first 2 visually selected lines |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
246 " 4 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
247 " 4 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
248 " 2) redo (.) on 3 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
249 " 5 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
250 " 5 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
251 func Test_visual_increment_09() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
252 call setline(1, ["2", "2", "", "3", "3", ""]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
253 exec "norm! ggVj2\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
254 call assert_equal(["4", "4", "", "3", "3", ""], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
255 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
256 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
257 exec "norm! 3j." |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
258 call assert_equal(["4", "4", "", "5", "5", ""], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
259 call assert_equal([0, 4, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
260 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
261 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
262 " 10) sequentially decrement 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
263 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
264 " 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
265 " 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
266 " 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
267 " 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
268 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
269 " 1) g Ctrl-X on visually selected lines |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
270 " 0 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
271 " -1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
272 " -2 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
273 " -3 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
274 func Test_visual_increment_10() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
275 call setline(1, repeat(["1"], 4)) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
276 exec "norm! GV3kg\<C-X>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
277 call assert_equal(["0", "-1", "-2", "-3"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
278 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
279 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
280 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
281 " 11) visually block selected indented lines |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
282 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
283 " 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
284 " 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
285 " 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
286 " 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
287 " Expexted: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
288 " 1) g Ctrl-A on block selected indented lines |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
289 " 2 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
290 " 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
291 " 3 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
292 " 4 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
293 func Test_visual_increment_11() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
294 call setline(1, [" 1", "1", " 1", " 1"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
295 exec "norm! f1\<C-V>3jg\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
296 call assert_equal([" 2", "1", " 3", " 4"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
297 call assert_equal([0, 1, 5, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
298 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
299 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
300 " 12) visually selected several columns |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
301 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
302 " 0 0 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
303 " 0 0 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
304 " 0 0 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
305 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
306 " 1) 'v' select last zero and first zeroes |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
307 " 0 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
308 " 1 0 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
309 " 1 0 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
310 func Test_visual_increment_12() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
311 call setline(1, repeat(["0 0"], 3)) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
312 exec "norm! $v++\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
313 call assert_equal(["0 1", "1 0", "1 0"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
314 call assert_equal([0, 1, 3, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
315 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
316 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
317 " 13) visually selected part of columns |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
318 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
319 " max: 100px |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
320 " max: 200px |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
321 " max: 300px |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
322 " max: 400px |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
323 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
324 " 1) 'v' on first two numbers Ctrl-A |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
325 " max: 110px |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
326 " max: 220px |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
327 " max: 330px |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
328 " max: 400px |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
329 " 2) 'v' on first two numbers Ctrl-X |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
330 " max: 90px |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
331 " max: 190px |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
332 " max: 290px |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
333 " max: 400px |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
334 func Test_visual_increment_13() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
335 call setline(1, ["max: 100px", "max: 200px", "max: 300px", "max: 400px"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
336 exec "norm! f1\<C-V>l2j\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
337 call assert_equal(["max: 110px", "max: 210px", "max: 310px", "max: 400px"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
338 call assert_equal([0, 1, 6, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
339 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
340 call setline(1, ["max: 100px", "max: 200px", "max: 300px", "max: 400px"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
341 exec "norm! ggf1\<C-V>l2j\<C-X>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
342 call assert_equal(["max: 90px", "max: 190px", "max: 290px", "max: 400px"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
343 call assert_equal([0, 1, 6, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
344 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
345 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
346 " 14) redo in block mode |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
347 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
348 " 1 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
349 " 1 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
350 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
351 " 1) Ctrl-a on first column, redo on second column |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
352 " 2 2 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
353 " 2 2 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
354 func Test_visual_increment_14() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
355 call setline(1, repeat(["1 1"], 2)) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
356 exec "norm! G\<C-V>k\<C-A>w." |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
357 call assert_equal(["2 2", "2 2"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
358 call assert_equal([0, 1, 3, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
359 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
360 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
361 " 15) block select single numbers |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
362 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
363 " 101 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
364 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
365 " 1) Ctrl-a on visually selected zero |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
366 " 111 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
367 func Test_visual_increment_15() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
368 call setline(1, ["101"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
369 exec "norm! lv\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
370 call assert_equal(["111"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
371 call assert_equal([0, 1, 2, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
372 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
373 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
374 " 16) increment right aligned numbers |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
375 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
376 " 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
377 " 19 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
378 " 119 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
379 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
380 " 1) Ctrl-a on line selected region |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
381 " 2 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
382 " 20 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
383 " 120 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
384 func Test_visual_increment_16() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
385 call setline(1, [" 1", " 19", " 119"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
386 exec "norm! VG\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
387 call assert_equal([" 2", " 20", " 120"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
388 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
389 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
390 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
391 " 17) block-wise increment and redo |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
392 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
393 " 100 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
394 " 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
395 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
396 " 100 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
397 " 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
398 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
399 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
400 " 1) Ctrl-V j $ on first block, afterwards '.' on second |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
401 " 101 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
402 " 2 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
403 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
404 " 101 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
405 " 2 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
406 func Test_visual_increment_17() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
407 call setline(1, [" 100", " 1", "", " 100", " 1"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
408 exec "norm! \<C-V>j$\<C-A>2j." |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
409 call assert_equal([" 101", " 2", "", " 101", " 1"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
410 call assert_equal([0, 3, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
411 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
412 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
413 " 18) repeat of g<Ctrl-a> |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
414 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
415 " 0 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
416 " 0 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
417 " 0 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
418 " 0 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
419 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
420 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
421 " 1) V 4j g<ctrl-a>, repeat twice afterwards with . |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
422 " 3 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
423 " 6 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
424 " 9 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
425 " 12 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
426 func Test_visual_increment_18() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
427 call setline(1, repeat(["0"], 4)) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
428 exec "norm! GV3kg\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
429 exec "norm! .." |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
430 call assert_equal(["3", "6", "9", "12"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
431 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
432 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
433 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
434 " 19) increment on number with nrformat including alpha |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
435 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
436 " 1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
437 " 1a |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
438 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
439 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
440 " 1) <Ctrl-V>j$ <ctrl-a> |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
441 " 2 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
442 " 2a |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
443 func Test_visual_increment_19() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
444 set nrformats+=alpha |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
445 call setline(1, ["1", "1a"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
446 exec "norm! \<C-V>G$\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
447 call assert_equal(["2", "2a"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
448 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
449 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
450 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
451 " 20) increment a single letter |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
452 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
453 " a |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
454 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
455 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
456 " 1) <Ctrl-a> and cursor is on a |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
457 " b |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
458 func Test_visual_increment_20() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
459 set nrformats+=alpha |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
460 call setline(1, ["a"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
461 exec "norm! \<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
462 call assert_equal(["b"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
463 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
464 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
465 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
466 " 21) block-wise increment on part of hexadecimal |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
467 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
468 " 0x123456 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
469 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
470 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
471 " 1) Ctrl-V f3 <ctrl-a> |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
472 " 0x124456 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
473 func Test_visual_increment_21() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
474 call setline(1, ["0x123456"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
475 exec "norm! \<C-V>f3\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
476 call assert_equal(["0x124456"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
477 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
478 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
479 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
480 " 22) Block increment on 0b0 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
481 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
482 " 0b1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
483 " 0b1 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
484 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
485 " 1) Ctrl-A on visually block selected region (cursor at beginning): |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
486 " 0b10 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
487 " 0b10 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
488 " 2) Ctrl-A on visually block selected region (cursor at end) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
489 " 0b10 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
490 " 0b10 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
491 func Test_visual_increment_22() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
492 call setline(1, repeat(["0b1"], 2)) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
493 exec "norm! \<C-V>j$\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
494 call assert_equal(repeat(["0b10"], 2), getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
495 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
496 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
497 call setline(1, repeat(["0b1"], 2)) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
498 exec "norm! $\<C-V>+\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
499 call assert_equal(repeat(["0b10"], 2), getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
500 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
501 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
502 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
503 " 23) block-wise increment on part of binary |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
504 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
505 " 0b1001 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
506 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
507 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
508 " 1) Ctrl-V 5l <ctrl-a> |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
509 " 0b1011 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
510 func Test_visual_increment_23() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
511 call setline(1, ["0b1001"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
512 exec "norm! \<C-V>4l\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
513 call assert_equal(["0b1011"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
514 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
515 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
516 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
517 " 24) increment hexadecimal |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
518 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
519 " 0x0b1001 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
520 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
521 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
522 " 1) <ctrl-a> |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
523 " 0x0b1002 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
524 func Test_visual_increment_24() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
525 call setline(1, ["0x0b1001"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
526 exec "norm! \<C-V>$\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
527 call assert_equal(["0x0b1002"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
528 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
529 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
530 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
531 " 25) increment binary with nrformats including alpha |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
532 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
533 " 0b1001a |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
534 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
535 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
536 " 1) <ctrl-a> |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
537 " 0b1010a |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
538 func Test_visual_increment_25() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
539 set nrformats+=alpha |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
540 call setline(1, ["0b1001a"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
541 exec "norm! \<C-V>$\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
542 call assert_equal(["0b1010a"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
543 call assert_equal([0, 1, 1, 0], getpos('.')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
544 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
545 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
546 " 26) increment binary with 32 bits |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
547 " Text: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
548 " 0b11111111111111111111111111111110 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
549 " |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
550 " Expected: |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
551 " 1) <ctrl-a> |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
552 " 0b11111111111111111111111111111111 |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
553 func Test_visual_increment_26() |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
554 set nrformats+=alpha |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
555 call setline(1, ["0b11111111111111111111111111111110"]) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
556 exec "norm! \<C-V>$\<C-A>" |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
557 call assert_equal(["0b11111111111111111111111111111111"], getline(1, '$')) |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
558 call assert_equal([0, 1, 1, 0], getpos('.')) |
7568
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
559 set nrformats-=alpha |
7544
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
560 endfunc |
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
561 |
7551
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
562 " 27) increment with 'rightreft', if supported |
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
563 func Test_visual_increment_27() |
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
564 if exists('+rightleft') |
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
565 set rightleft |
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
566 call setline(1, ["1234 56"]) |
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
567 |
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
568 exec "norm! $\<C-A>" |
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
569 call assert_equal(["1234 57"], getline(1, '$')) |
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
570 call assert_equal([0, 1, 7, 0], getpos('.')) |
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
571 |
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
572 exec "norm! \<C-A>" |
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
573 call assert_equal(["1234 58"], getline(1, '$')) |
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
574 call assert_equal([0, 1, 7, 0], getpos('.')) |
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
575 set norightleft |
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
576 endif |
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
577 endfunc |
f624d7671e0c
commit https://github.com/vim/vim/commit/6a3c8aff0439c8406082760c54b26e00ff19a90c
Christian Brabandt <cb@256bit.org>
parents:
7544
diff
changeset
|
578 |
7574
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
579 " Tab code and linewise-visual inc/dec |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
580 func Test_visual_increment_28() |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
581 call setline(1, ["x\<TAB>10", "\<TAB>-1"]) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
582 exec "norm! Vj\<C-A>" |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
583 call assert_equal(["x\<TAB>11", "\<TAB>0"], getline(1, '$')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
584 call assert_equal([0, 1, 1, 0], getpos('.')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
585 |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
586 call setline(1, ["x\<TAB>10", "\<TAB>-1"]) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
587 exec "norm! ggVj\<C-X>" |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
588 call assert_equal(["x\<TAB>9", "\<TAB>-2"], getline(1, '$')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
589 call assert_equal([0, 1, 1, 0], getpos('.')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
590 endfunc |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
591 |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
592 " Tab code and linewise-visual inc/dec with 'nrformats'+=alpha |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
593 func Test_visual_increment_29() |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
594 set nrformats+=alpha |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
595 call setline(1, ["x\<TAB>10", "\<TAB>-1"]) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
596 exec "norm! Vj\<C-A>" |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
597 call assert_equal(["y\<TAB>10", "\<TAB>0"], getline(1, '$')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
598 call assert_equal([0, 1, 1, 0], getpos('.')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
599 |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
600 call setline(1, ["x\<TAB>10", "\<TAB>-1"]) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
601 exec "norm! ggVj\<C-X>" |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
602 call assert_equal(["w\<TAB>10", "\<TAB>-2"], getline(1, '$')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
603 call assert_equal([0, 1, 1, 0], getpos('.')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
604 endfunc |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
605 |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
606 " Tab code and character-visual inc/dec |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
607 func Test_visual_increment_30() |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
608 call setline(1, ["x\<TAB>10", "\<TAB>-1"]) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
609 exec "norm! f1vjf1\<C-A>" |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
610 call assert_equal(["x\<TAB>11", "\<TAB>0"], getline(1, '$')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
611 call assert_equal([0, 1, 3, 0], getpos('.')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
612 |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
613 call setline(1, ["x\<TAB>10", "\<TAB>-1"]) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
614 exec "norm! ggf1vjf1\<C-X>" |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
615 call assert_equal(["x\<TAB>9", "\<TAB>-2"], getline(1, '$')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
616 call assert_equal([0, 1, 3, 0], getpos('.')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
617 endfunc |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
618 |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
619 " Tab code and blockwise-visual inc/dec |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
620 func Test_visual_increment_31() |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
621 call setline(1, ["x\<TAB>10", "\<TAB>-1"]) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
622 exec "norm! f1\<C-V>jl\<C-A>" |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
623 call assert_equal(["x\<TAB>11", "\<TAB>0"], getline(1, '$')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
624 call assert_equal([0, 1, 3, 0], getpos('.')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
625 |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
626 call setline(1, ["x\<TAB>10", "\<TAB>-1"]) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
627 exec "norm! ggf1\<C-V>jl\<C-X>" |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
628 call assert_equal(["x\<TAB>9", "\<TAB>-2"], getline(1, '$')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
629 call assert_equal([0, 1, 3, 0], getpos('.')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
630 endfunc |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
631 |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
632 " Tab code and blockwise-visual decrement with 'linebreak' and 'showbreak' |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
633 func Test_visual_increment_32() |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
634 28vnew dummy_31 |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
635 set linebreak showbreak=+ |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
636 call setline(1, ["x\<TAB>\<TAB>\<TAB>10", "\<TAB>\<TAB>\<TAB>\<TAB>-1"]) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
637 exec "norm! ggf0\<C-V>jg_\<C-X>" |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
638 call assert_equal(["x\<TAB>\<TAB>\<TAB>1-1", "\<TAB>\<TAB>\<TAB>\<TAB>-2"], getline(1, '$')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
639 call assert_equal([0, 1, 6, 0], getpos('.')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
640 bwipe! |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
641 endfunc |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
642 |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
643 " Tab code and blockwise-visual increment with $ |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
644 func Test_visual_increment_33() |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
645 call setline(1, ["\<TAB>123", "456"]) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
646 exec "norm! gg0\<C-V>j$\<C-A>" |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
647 call assert_equal(["\<TAB>124", "457"], getline(1, '$')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
648 call assert_equal([0, 1, 1, 0], getpos('.')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
649 endfunc |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
650 |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
651 " Tab code and blockwise-visual increment and redo |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
652 func Test_visual_increment_34() |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
653 call setline(1, ["\<TAB>123", " 456789"]) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
654 exec "norm! gg0\<C-V>j\<C-A>" |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
655 call assert_equal(["\<TAB>123", " 457789"], getline(1, '$')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
656 call assert_equal([0, 1, 1, 0], getpos('.')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
657 |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
658 exec "norm! .." |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
659 call assert_equal(["\<TAB>123", " 459789"], getline(1, '$')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
660 call assert_equal([0, 1, 1, 0], getpos('.')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
661 endfunc |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
662 |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
663 " Tab code, spaces and character-visual increment and redo |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
664 func Test_visual_increment_35() |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
665 call setline(1, ["\<TAB>123", " 123", "\<TAB>123", "\<TAB>123"]) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
666 exec "norm! ggvjf3\<C-A>..." |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
667 call assert_equal(["\<TAB>127", " 127", "\<TAB>123", "\<TAB>123"], getline(1, '$')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
668 call assert_equal([0, 1, 2, 0], getpos('.')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
669 endfunc |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
670 |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
671 " Tab code, spaces and blockwise-visual increment and redo |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
672 func Test_visual_increment_36() |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
673 call setline(1, [" 123", "\<TAB>456789"]) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
674 exec "norm! G0\<C-V>kl\<C-A>" |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
675 call assert_equal([" 123", "\<TAB>556789"], getline(1, '$')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
676 call assert_equal([0, 1, 1, 0], getpos('.')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
677 |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
678 exec "norm! ..." |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
679 call assert_equal([" 123", "\<TAB>856789"], getline(1, '$')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
680 call assert_equal([0, 1, 1, 0], getpos('.')) |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
681 endfunc |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
682 |
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
683 " block-wise increment and dot-repeat |
7568
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
684 " Text: |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
685 " 1 23 |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
686 " 4 56 |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
687 " |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
688 " Expected: |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
689 " 1) f2 Ctrl-V jl <ctrl-a>, repeat twice afterwards with . |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
690 " 1 26 |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
691 " 4 59 |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
692 " |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
693 " Try with and without indent. |
7574
b872724c37db
commit https://github.com/vim/vim/commit/d79e55016cf8268cee935f1ac3b5b28712d1399e
Christian Brabandt <cb@256bit.org>
parents:
7568
diff
changeset
|
694 func Test_visual_increment_37() |
7568
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
695 call setline(1, [" 1 23", " 4 56"]) |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
696 exec "norm! ggf2\<C-V>jl\<C-A>.." |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
697 call assert_equal([" 1 26", " 4 59"], getline(1, 2)) |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
698 |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
699 call setline(1, ["1 23", "4 56"]) |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
700 exec "norm! ggf2\<C-V>jl\<C-A>.." |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
701 call assert_equal(["1 26", "4 59"], getline(1, 2)) |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
702 endfunc |
5274513d3f54
commit https://github.com/vim/vim/commit/e1edc1caba05c553fa60b1cf45a7670b1cfd63fe
Christian Brabandt <cb@256bit.org>
parents:
7551
diff
changeset
|
703 |
7578
fdae4c496775
commit https://github.com/vim/vim/commit/ef2b5036b3005f1ce15d146dce72379a9834c56d
Christian Brabandt <cb@256bit.org>
parents:
7574
diff
changeset
|
704 " Check redo after the normal mode increment |
fdae4c496775
commit https://github.com/vim/vim/commit/ef2b5036b3005f1ce15d146dce72379a9834c56d
Christian Brabandt <cb@256bit.org>
parents:
7574
diff
changeset
|
705 func Test_visual_increment_38() |
fdae4c496775
commit https://github.com/vim/vim/commit/ef2b5036b3005f1ce15d146dce72379a9834c56d
Christian Brabandt <cb@256bit.org>
parents:
7574
diff
changeset
|
706 exec "norm! i10\<ESC>5\<C-A>." |
fdae4c496775
commit https://github.com/vim/vim/commit/ef2b5036b3005f1ce15d146dce72379a9834c56d
Christian Brabandt <cb@256bit.org>
parents:
7574
diff
changeset
|
707 call assert_equal(["20"], getline(1, '$')) |
fdae4c496775
commit https://github.com/vim/vim/commit/ef2b5036b3005f1ce15d146dce72379a9834c56d
Christian Brabandt <cb@256bit.org>
parents:
7574
diff
changeset
|
708 call assert_equal([0, 1, 2, 0], getpos('.')) |
fdae4c496775
commit https://github.com/vim/vim/commit/ef2b5036b3005f1ce15d146dce72379a9834c56d
Christian Brabandt <cb@256bit.org>
parents:
7574
diff
changeset
|
709 endfunc |
fdae4c496775
commit https://github.com/vim/vim/commit/ef2b5036b3005f1ce15d146dce72379a9834c56d
Christian Brabandt <cb@256bit.org>
parents:
7574
diff
changeset
|
710 |
7544
25e3b1a99768
commit https://github.com/vim/vim/commit/44132a10aeb45c957959cafb4ac39d3f478be98c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
711 " vim: tabstop=2 shiftwidth=2 expandtab |