view src/testdir/test_scroll_opt.vim @ 15991:f362d695bcf9 v8.1.1001

patch 8.1.1001: Visual area not correct when using 'cursorline' commit https://github.com/vim/vim/commit/8156ed37558231a8167a1a61a147713d84c9af59 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 9 11:46:15 2019 +0100 patch 8.1.1001: Visual area not correct when using 'cursorline' Problem: Visual area not correct when using 'cursorline'. Solution: Update w_last_cursorline also in Visual mode. (Hirohito Higashi, closes #4086)
author Bram Moolenaar <Bram@vim.org>
date Sat, 09 Mar 2019 12:00:05 +0100
parents f8f505ffc0a6
children 08940efa6b4e
line wrap: on
line source

" Test for reset 'scroll'
"

func Test_reset_scroll()
  let scr = &l:scroll

  setlocal scroll=1
  setlocal scroll&
  call assert_equal(scr, &l:scroll)

  setlocal scroll=1
  setlocal scroll=0
  call assert_equal(scr, &l:scroll)

  try
    execute 'setlocal scroll=' . (winheight(0) + 1)
    " not reached
    call assert_false(1)
  catch
    call assert_exception('E49:')
  endtry

  split

  let scr = &l:scroll

  setlocal scroll=1
  setlocal scroll&
  call assert_equal(scr, &l:scroll)

  setlocal scroll=1
  setlocal scroll=0
  call assert_equal(scr, &l:scroll)

  quit!
endfunc