comparison src/testdir/test_tcl.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 6c5c8de48152
children f38fcbf343ce
comparison
equal deleted inserted replaced
14394:1386ba8142b4 14395:c15bef307de6
663 tcl set bar "bar" 663 tcl set bar "bar"
664 call assert_equal('bar', TclEval('set bar')) 664 call assert_equal('bar', TclEval('set bar'))
665 665
666 tcl unset bar 666 tcl unset bar
667 endfunc 667 endfunc
668
669 func Test_set_cursor()
670 " Check that setting the cursor position works.
671 new
672 call setline(1, ['first line', 'second line'])
673 normal gg
674 tcldo $::vim::current(window) cursor 1 5
675 call assert_equal([1, 5], [line('.'), col('.')])
676
677 " Check that movement after setting cursor position keeps current column.
678 normal j
679 call assert_equal([2, 5], [line('.'), col('.')])
680 endfunc