view src/testdir/test_feedkeys.vim @ 17364:31f31e938961 v8.1.1681

patch 8.1.1681: insert stray "{" when listener gets buffer line commit https://github.com/vim/vim/commit/0fb286e82d28730fcb3293894dd4df2e069eaf9a Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 13 20:14:45 2019 +0200 patch 8.1.1681: insert stray "{" when listener gets buffer line Problem: Insert stray "{" when listener gets buffer line. (Paul Jolly) Solution: Flush the cached line after invoking listeners. (closes https://github.com/vim/vim/issues/4455)
author Bram Moolenaar <Bram@vim.org>
date Sat, 13 Jul 2019 20:15:04 +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