view src/testdir/test_feedkeys.vim @ 23992:faca24acb37f v8.2.2538

patch 8.2.2538: crash when using Python list iterator Commit: https://github.com/vim/vim/commit/21578271bb717f7ab7b8728e9efa54c3b60ee7e4 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 21 19:12:47 2021 +0100 patch 8.2.2538: crash when using Python list iterator Problem: Crash when using Python list iterator. Solution: Increment the list reference count. (closes https://github.com/vim/vim/issues/7886)
author Bram Moolenaar <Bram@vim.org>
date Sun, 21 Feb 2021 19:15:03 +0100
parents 08940efa6b4e
children e06cbcf4b94b
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

" vim: shiftwidth=2 sts=2 expandtab