Mercurial > vim
annotate src/testdir/test_increment_dbcs.vim @ 19176:be81baeb69f8 v8.2.0147
patch 8.2.0147: block Visual mode operators not correct when 'linebreak' set
Commit: https://github.com/vim/vim/commit/03c3bd9fd094c1aede2e8fe3ad8fd25b9f033053
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 23 20:58:09 2020 +0100
patch 8.2.0147: block Visual mode operators not correct when 'linebreak' set
Problem: Block Visual mode operators not correct when 'linebreak' set.
Solution: Set w_p_lbr to lbr_saved more often. (Ken Takata, closes https://github.com/vim/vim/issues/5524)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 23 Jan 2020 21:00:03 +0100 |
parents | 2dcaa860e3fc |
children | 08940efa6b4e |
rev | line source |
---|---|
9345
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Tests for using Ctrl-A/Ctrl-X using DBCS. |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 set encoding=cp932 |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 scriptencoding cp932 |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 func SetUp() |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 new |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 set nrformats& |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 endfunc |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 func TearDown() |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 bwipe! |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 endfunc |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 func Test_increment_dbcs_1() |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 set nrformats+=alpha |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 call setline(1, ["ŽR1"]) |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 exec "norm! 0\<C-A>" |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 call assert_equal(["ŽR2"], getline(1, '$')) |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 call assert_equal([0, 1, 3, 0], getpos('.')) |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 call setline(1, ["‚`‚a‚b0xDE‚e"]) |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 exec "norm! 0\<C-X>" |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 call assert_equal(["‚`‚a‚b0xDD‚e"], getline(1, '$')) |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 call assert_equal([0, 1, 10, 0], getpos('.')) |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 endfunc |
96a248eddf5f
commit https://github.com/vim/vim/commit/d388d2ac8bf8c770bf97dc406e99a20ba5104855
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 |
9909
3ee84d270ea7
commit https://github.com/vim/vim/commit/9e4d8215d386100ab660d7d11e6620fd148b605e
Christian Brabandt <cb@256bit.org>
parents:
9345
diff
changeset
|
27 " vim: shiftwidth=2 sts=2 expandtab |