view src/testdir/test_scroll_opt.vim @ 14615:c6b41d47bac1 v8.1.0321

patch 8.1.0321: 'incsearch' regression: / highlights everything commit https://github.com/vim/vim/commit/4edfe2d2a2d70ea66a7f73e9b923c2d1f6246a57 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 23 20:55:45 2018 +0200 patch 8.1.0321: 'incsearch' regression: /\v highlights everything Problem: 'incsearch' regression: /\v highlights everything. Solution: Put back the empty_pattern() check.
author Christian Brabandt <cb@256bit.org>
date Thu, 23 Aug 2018 21:00:06 +0200
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