blob: 25482db54c1c6025906a3d31738b6b40b50e8680 [file] [log] [blame]
Bram Moolenaar913077c2012-03-28 19:59:04 +02001Tests for curswant not changing when setting an option
2
3STARTTEST
4:so small.vim
5:/^start target options$/+1,/^end target options$/-1 yank
6:let target_option_names = split(@0)
7:function TestCurswant(option_name)
8: normal! ggf8j
9: let curswant_before = winsaveview().curswant
10: execute 'let' '&'.a:option_name '=' '&'.a:option_name
11: let curswant_after = winsaveview().curswant
12: return [a:option_name, curswant_before, curswant_after]
13:endfunction
14:
15:new
16:put =['1234567890', '12345']
17:1 delete _
18:let result = []
19:for option_name in target_option_names
20: call add(result, TestCurswant(option_name))
21:endfor
22:
23:new
24:put =map(copy(result), 'join(v:val, '' '')')
25:1 delete _
26:write test.out
27:
28:qall!
29ENDTEST
30
31start target options
32 tabstop
33 timeoutlen
34 ttimeoutlen
35end target options