view src/testdir/test_curswant.vim @ 23936:a0e02766e06d v8.2.2510

patch 8.2.2510: internal error when popup with mask is zero height or width Commit: https://github.com/vim/vim/commit/10ccfb2a17e736ace054b19dc712544b4e961671 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 13 21:31:18 2021 +0100 patch 8.2.2510: internal error when popup with mask is zero height or width Problem: Internal error when popup with mask is zero height or width. Solution: Bail out if width or height is zero. (closes https://github.com/vim/vim/issues/7831)
author Bram Moolenaar <Bram@vim.org>
date Sat, 13 Feb 2021 21:45:05 +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