view src/testdir/test_curswant.vim @ 14002:ade79e3e3b88 v8.1.0019

patch 8.1.0019: error when defining a Lambda with index of a function result commit https://github.com/vim/vim/commit/b4518563c73460150344a57879bf5b22cb8b1c77 Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 22 18:31:35 2018 +0200 patch 8.1.0019: error when defining a Lambda with index of a function result Problem: Error when defining a Lambda with index of a function result. Solution: When not evaluating an expression and skipping a function call, set the return value to VAR_UNKNOWN.
author Christian Brabandt <cb@256bit.org>
date Tue, 22 May 2018 18:45:05 +0200
parents 0240e7e3d736
children 08940efa6b4e
line wrap: on
line source

" Tests for curswant not changing when setting an option

func Test_curswant()
  new
  call append(0, ['1234567890', '12345'])

  normal! ggf8j
  call assert_equal(7, winsaveview().curswant)
  let &tabstop=&tabstop
  call assert_equal(4, winsaveview().curswant)

  normal! ggf8j
  call assert_equal(7, winsaveview().curswant)
  let &timeoutlen=&timeoutlen
  call assert_equal(7, winsaveview().curswant)

  normal! ggf8j
  call assert_equal(7, winsaveview().curswant)
  let &ttimeoutlen=&ttimeoutlen
  call assert_equal(7, winsaveview().curswant)

  enew!
endfunc