view src/testdir/test_curswant.vim @ 26907:6f43253463cc v8.2.3982

patch 8.2.3982: some lines of code not covered by tests Commit: https://github.com/vim/vim/commit/8bfa0eb863357c1013024233ebb2e95a0a848002 Author: Dominique Pelle <dominique.pelle@gmail.com> Date: Sun Jan 2 16:16:33 2022 +0000 patch 8.2.3982: some lines of code not covered by tests Problem: Some lines of code not covered by tests. Solution: Add a few more test cases. (Dominique Pell?, closes https://github.com/vim/vim/issues/9453)
author Bram Moolenaar <Bram@vim.org>
date Sun, 02 Jan 2022 17:30:02 +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