view src/testdir/test_curswant.vim @ 27199:d4f254d02d7c v8.2.4128

patch 8.2.4128: crash when method cannot be found Commit: https://github.com/vim/vim/commit/64283d5e1f5487e2dbaa17d478e6eae040daa064 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 18 10:37:29 2022 +0000 patch 8.2.4128: crash when method cannot be found Problem: Crash when method cannot be found. (Christian J. Robinson) Solution: Don't mix up pointer names.
author Bram Moolenaar <Bram@vim.org>
date Tue, 18 Jan 2022 11:45:04 +0100
parents 08940efa6b4e
children
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

" vim: shiftwidth=2 sts=2 expandtab