Mercurial > vim
comparison src/testdir/test_lua.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 | 396b71b242b2 |
children | f7130bc17248 |
comparison
equal
deleted
inserted
replaced
14394:1386ba8142b4 | 14395:c15bef307de6 |
---|---|
553 call assert_fails('luafile Xlua_file', "Xlua_file:1: unexpected symbol near 'nil'") | 553 call assert_fails('luafile Xlua_file', "Xlua_file:1: unexpected symbol near 'nil'") |
554 | 554 |
555 call delete('Xlua_file') | 555 call delete('Xlua_file') |
556 bwipe! | 556 bwipe! |
557 endfunc | 557 endfunc |
558 | |
559 func Test_set_cursor() | |
560 " Check that setting the cursor position works. | |
561 new | |
562 call setline(1, ['first line', 'second line']) | |
563 normal gg | |
564 lua << EOF | |
565 w = vim.window() | |
566 w.line = 1 | |
567 w.col = 5 | |
568 EOF | |
569 call assert_equal([1, 5], [line('.'), col('.')]) | |
570 | |
571 " Check that movement after setting cursor position keeps current column. | |
572 normal j | |
573 call assert_equal([2, 5], [line('.'), col('.')]) | |
574 endfunc |