view src/testdir/test_erasebackword.vim @ 30473:1928947b8e1a v9.0.0572

patch 9.0.0572: insert complete tests leave a mapping behind Commit: https://github.com/vim/vim/commit/75f4bafabdcc6bce5cf3e09fee29c634bf102c17 Author: zeertzjq <zeertzjq@outlook.com> Date: Sat Sep 24 14:08:23 2022 +0100 patch 9.0.0572: insert complete tests leave a mapping behind Problem: Insert complete tests leave a mapping behind. Solution: Use a buffer-local mapping. (closes https://github.com/vim/vim/issues/11211)
author Bram Moolenaar <Bram@vim.org>
date Sat, 24 Sep 2022 15:15:03 +0200
parents 08940efa6b4e
children
line wrap: on
line source

" Test for i_CTRL-W

func Test_erasebackword()
  enew

  exe "normal o wwwこんにちわ世界ワールドvim \<C-W>"
  call assert_equal(' wwwこんにちわ世界ワールド', getline('.'))
  exe "normal o wwwこんにちわ世界ワールドvim \<C-W>\<C-W>"
  call assert_equal(' wwwこんにちわ世界', getline('.'))
  exe "normal o wwwこんにちわ世界ワールドvim \<C-W>\<C-W>\<C-W>"
  call assert_equal(' wwwこんにちわ', getline('.'))
  exe "normal o wwwこんにちわ世界ワールドvim \<C-W>\<C-W>\<C-W>\<C-W>"
  call assert_equal(' www', getline('.'))
  exe "normal o wwwこんにちわ世界ワールドvim \<C-W>\<C-W>\<C-W>\<C-W>\<C-W>"
  call assert_equal(' ', getline('.'))
  exe "normal o wwwこんにちわ世界ワールドvim \<C-W>\<C-W>\<C-W>\<C-W>\<C-W>\<C-W>"
  call assert_equal('', getline('.'))

  enew!
endfunc

" vim: shiftwidth=2 sts=2 expandtab