comparison src/testdir/test_python3.vim @ 14395:c15bef307de6 v8.1.0212

patch 8.1.0212: preferred cursor column not set in interfaces commit https://github.com/vim/vim/commit/53901442f37a59e5495165f91db5574c0b43ab04 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 25 22:02:36 2018 +0200 patch 8.1.0212: preferred cursor column not set in interfaces Problem: Preferred cursor column not set in interfaces. Solution: Set w_set_curswant when setting the cursor. (David Hotham, closes #3060)
author Christian Brabandt <cb@256bit.org>
date Wed, 25 Jul 2018 22:15:05 +0200
parents 27b42717662b
children ee63f4fe3d45
comparison
equal deleted inserted replaced
14394:1386ba8142b4 14395:c15bef307de6
1 " Test for python 2 commands. 1 " Test for python 3 commands.
2 " TODO: move tests from test88.in here. 2 " TODO: move tests from test88.in here.
3 3
4 if !has('python3') 4 if !has('python3')
5 finish 5 finish
6 endif 6 endif
20 py3do vim.command("new") 20 py3do vim.command("new")
21 call assert_equal(wincount + 1, winnr('$')) 21 call assert_equal(wincount + 1, winnr('$'))
22 bwipe! 22 bwipe!
23 bwipe! 23 bwipe!
24 endfunc 24 endfunc
25
26 func Test_set_cursor()
27 " Check that setting the cursor position works.
28 py3 import vim
29 new
30 call setline(1, ['first line', 'second line'])
31 normal gg
32 py3do vim.current.window.cursor = (1, 5)
33 call assert_equal([1, 6], [line('.'), col('.')])
34
35 " Check that movement after setting cursor position keeps current column.
36 normal j
37 call assert_equal([2, 6], [line('.'), col('.')])
38 endfunc