view src/testdir/test_scroll_opt.vim @ 19528:3b026343f398 v8.2.0321

patch 8.2.0321: Vim9: ":execute" does not work yet Commit: https://github.com/vim/vim/commit/ad39c094d261109a695aba2c4f19fe336736cc55 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 26 18:23:43 2020 +0100 patch 8.2.0321: Vim9: ":execute" does not work yet Problem: Vim9: ":execute" does not work yet. Solution: Add ISN_EXECUTE. (closes https://github.com/vim/vim/issues/5699) Also make :echo work with more than one argument.
author Bram Moolenaar <Bram@vim.org>
date Wed, 26 Feb 2020 18:30:04 +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