Mercurial > vim
annotate src/testdir/test_scroll_opt.vim @ 13742:a34b1323286c v8.0.1743
patch 8.0.1743: terminal window options are named inconsistently
commit https://github.com/vim/vim/commit/6d150f783d5d3820fe69734dda1e79b8276a84d2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 21 20:03:20 2018 +0200
patch 8.0.1743: terminal window options are named inconsistently
Problem: Terminal window options are named inconsistently.
Solution: prefix terminal window options with "termwin". Keep the old names
for now as an alias.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 21 Apr 2018 20:15:07 +0200 |
parents | f8f505ffc0a6 |
children | 08940efa6b4e |
rev | line source |
---|---|
12718
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test for reset 'scroll' |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 " |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 func Test_reset_scroll() |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 let scr = &l:scroll |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 setlocal scroll=1 |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 setlocal scroll& |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 call assert_equal(scr, &l:scroll) |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 setlocal scroll=1 |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 setlocal scroll=0 |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 call assert_equal(scr, &l:scroll) |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 try |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 execute 'setlocal scroll=' . (winheight(0) + 1) |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 " not reached |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 call assert_false(1) |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 catch |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 call assert_exception('E49:') |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 endtry |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 split |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 let scr = &l:scroll |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 setlocal scroll=1 |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 setlocal scroll& |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 call assert_equal(scr, &l:scroll) |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 setlocal scroll=1 |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 setlocal scroll=0 |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 call assert_equal(scr, &l:scroll) |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 quit! |
f8f505ffc0a6
patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 endfunc |