view src/testdir/test_scroll_opt.vim @ 24390:492f7b54f691 v8.2.2735

patch 8.2.2735: Vim9: function reference found with prefix, not without Commit: https://github.com/vim/vim/commit/fa5963880df1d11613594ab78c0a68f894d34aa3 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Apr 7 21:58:16 2021 +0200 patch 8.2.2735: Vim9: function reference found with prefix, not without Problem: Vim9: function reference found with prefix, not without. Solution: Also find function reference without prefix.
author Bram Moolenaar <Bram@vim.org>
date Wed, 07 Apr 2021 22:00:04 +0200
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