view src/testdir/test_feedkeys.vim @ 20768:1e2e81dbb958 v8.2.0936

patch 8.2.0936: some terminals misinterpret the code for getting cursor style Commit: https://github.com/vim/vim/commit/a45551a53557dba98973fdb3ff737dea2fffcda3 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 9 15:57:37 2020 +0200 patch 8.2.0936: some terminals misinterpret the code for getting cursor style Problem: Some terminals misinterpret the code for getting cursor style. Solution: Send a sequence to the terminal and check the result. (IWAMOTO Kouichi, closes #2126) Merged with current code.
author Bram Moolenaar <Bram@vim.org>
date Tue, 09 Jun 2020 16:00: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