view src/testdir/test_scroll_opt.vim @ 15687:cb501b3c9fb5 v8.1.0851

patch 8.1.0851: feedkeys() with "L" does not work properly commit https://github.com/vim/vim/commit/8d4ce56a19ed14d13332f94ad592fff2d9a715d5 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 30 22:01:40 2019 +0100 patch 8.1.0851: feedkeys() with "L" does not work properly Problem: feedkeys() with "L" does not work properly. Solution: Do not set typebuf_was_filled when using "L". (Ozaki Kiichi, closes #3885)
author Bram Moolenaar <Bram@vim.org>
date Wed, 30 Jan 2019 22:15:07 +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