Mercurial > vim
view src/testdir/test_feedkeys.vim @ 14677:7771a1ff8b99 v8.1.0351
patch 8.1.0351: 'incsearch' for :/foo/s//<Esc> changes last search pattern
commit https://github.com/vim/vim/commit/198cb66d652d3d8ac16226dcc929a11b0b720151
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 6 21:44:17 2018 +0200
patch 8.1.0351: 'incsearch' for :/foo/s//<Esc> changes last search pattern
Problem: 'incsearch' for :/foo/s//<Esc> changes last search pattern.
Solution: Save the last search pattern earlier.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 06 Sep 2018 21:45: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