view src/testdir/test_scroll_opt.vim @ 19087:e3848b251a01 v8.2.0104

patch 8.2.0104: using channel or job with ":execute" has strange effects Commit: https://github.com/vim/vim/commit/b662591e505e8523634a1c8ddfb7fe44fae880c6 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 8 20:09:01 2020 +0100 patch 8.2.0104: using channel or job with ":execute" has strange effects Problem: Using channel or job with ":execute" has strange effects. Solution: Give an error message for Job and Channel.
author Bram Moolenaar <Bram@vim.org>
date Wed, 08 Jan 2020 20:15:03 +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