view src/testdir/test_curswant.vim @ 19097:bcbc9fe665b5 v8.2.0109

patch 8.2.0109: corrupted text properties when expanding spaces Commit: https://github.com/vim/vim/commit/ac15fd8c6761763c8feedef1a2fbd8309f0a823c Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 9 21:35:48 2020 +0100 patch 8.2.0109: corrupted text properties when expanding spaces Problem: Corrupted text properties when expanding spaces. Solution: Reallocate the line. (Nobuhiro Takasaki, closes https://github.com/vim/vim/issues/5457)
author Bram Moolenaar <Bram@vim.org>
date Thu, 09 Jan 2020 21:45:03 +0100
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