mirror of
https://github.com/neovim/neovim.git
synced 2024-12-28 14:31:13 -07:00
4b7f7be301
Test_edit_08() depends on special-case handling in has_compl_option() and redrawing() which are in Vim but are not wanted in Nvim. Using a Lua test instead of depending on workarounds in the core to make the VimL test work.
26 lines
642 B
Lua
26 lines
642 B
Lua
-- Test for edit functions
|
|
-- See also: src/nvim/testdir/test_edit.vim
|
|
|
|
local helpers = require('test.functional.helpers')(after_each)
|
|
local source = helpers.source
|
|
local eq, eval = helpers.eq, helpers.eval
|
|
local funcs = helpers.funcs
|
|
local clear = helpers.clear
|
|
|
|
describe('edit', function()
|
|
before_each(clear)
|
|
|
|
it('reset insertmode from i_ctrl-r_=', function()
|
|
source([=[
|
|
call setline(1, ['abc'])
|
|
call cursor(1, 4)
|
|
call feedkeys(":set im\<cr>ZZZ\<c-r>=setbufvar(1,'&im', 0)\<cr>",'tnix')
|
|
]=])
|
|
eq({'abZZZc'}, funcs.getline(1,'$'))
|
|
eq({0, 1, 1, 0}, funcs.getpos('.'))
|
|
eq(0, eval('&im'))
|
|
end)
|
|
|
|
end)
|
|
|