view src/testdir/test_scroll_opt.vim @ 13132:fe0cec169589 v8.0.1440

patch 8.0.1440: terminal window: some vterm responses are delayed commit https://github.com/vim/vim/commit/b50773c6df0bc2c9c2ab1afecc78083abc606de0 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 30 22:31:19 2018 +0100 patch 8.0.1440: terminal window: some vterm responses are delayed Problem: Terminal window: some vterm responses are delayed. Solution: After writing input. check if there is output to read. (Ozaki Kiichi, closes #2594)
author Christian Brabandt <cb@256bit.org>
date Tue, 30 Jan 2018 22:45:05 +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