view src/testdir/test_scroll_opt.vim @ 27319:c6533967ca9f v8.2.4188

patch 8.2.4188: not all gitconfig files are recognized Commit: https://github.com/vim/vim/commit/bcfa11b7dfdfbb4d412dd843a6da3fce68ba2e39 Author: Tim Pope <code@tpope.net> Date: Sun Jan 23 11:28:16 2022 +0000 patch 8.2.4188: not all gitconfig files are recognized Problem: Not all gitconfig files are recognized. Solution: Add a few more patterns. (Tim Pope, closes https://github.com/vim/vim/issues/9597)
author Bram Moolenaar <Bram@vim.org>
date Sun, 23 Jan 2022 12:30:05 +0100
parents 08940efa6b4e
children 6c6ac189a05f
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

" vim: shiftwidth=2 sts=2 expandtab