view src/testdir/test_scroll_opt.vim @ 14143:2aec369c4fc3 v8.1.0089

patch 8.1.0089: error when ending the terminal debugger commit https://github.com/vim/vim/commit/a15b0a936d2013e99e9323da9b920a5d93e4fb5a Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 19 22:34:46 2018 +0200 patch 8.1.0089: error when ending the terminal debugger Problem: error when ending the terminal debugger Solution: Fix deleting defined signs for breakpoints. Make the debugger work better on MS-Windows.
author Christian Brabandt <cb@256bit.org>
date Tue, 19 Jun 2018 22:45:05 +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