view src/testdir/test_curswant.vim @ 25222:fbb530e081ca v8.2.3147

patch 8.2.3147: Vim9: profiling does not work with a nested function Commit: https://github.com/vim/vim/commit/648594eaf703fe9a862cb12a35702a10aff6e5a9 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 11 17:55:01 2021 +0200 patch 8.2.3147: Vim9: profiling does not work with a nested function Problem: Vim9: profiling does not work with a nested function. Solution: Also compile a nested function without profiling. (closes https://github.com/vim/vim/issues/8543) Handle that compiling may cause the table of compiled functions to change.
author Bram Moolenaar <Bram@vim.org>
date Sun, 11 Jul 2021 18:00:04 +0200
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