view src/testdir/test_feedkeys.vim @ 17524:2b35e273392b v8.1.1760

patch 8.1.1760: extra line break for wrapping output of :args commit https://github.com/vim/vim/commit/9800bfe0fc7596e8fee97172139f0777bac639fb Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 27 21:23:45 2019 +0200 patch 8.1.1760: extra line break for wrapping output of :args Problem: Extra line break for wrapping output of :args. Solution: Avoid the extra line break. (Daniel Hahler, closes https://github.com/vim/vim/issues/4737)
author Bram Moolenaar <Bram@vim.org>
date Sat, 27 Jul 2019 21:30:05 +0200
parents 6b70b9cdebfc
children 08940efa6b4e
line wrap: on
line source

" Test feedkeys() function.

func Test_feedkeys_x_with_empty_string()
  new
  call feedkeys("ifoo\<Esc>")
  call assert_equal('', getline('.'))
  call feedkeys('', 'x')
  call assert_equal('foo', getline('.'))

  " check it goes back to normal mode immediately.
  call feedkeys('i', 'x')
  call assert_equal('foo', getline('.'))
  quit!
endfunc