diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-12-16 15:40:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-16 15:40:21 +0100 |
commit | 2debabb0805ccd014478e6aff88fce8129a352d0 (patch) | |
tree | 37077a4618b573d8c8ac6386df5a0d53ce4e94e2 /test/functional/eval/api_functions_spec.lua | |
parent | 5e202f69b3e42b90bc0393b0cee3bfddd2678216 (diff) | |
parent | 30ef8c693c08e0b507851b93c1905f0de86ad384 (diff) | |
download | rneovim-2debabb0805ccd014478e6aff88fce8129a352d0.tar.gz rneovim-2debabb0805ccd014478e6aff88fce8129a352d0.tar.bz2 rneovim-2debabb0805ccd014478e6aff88fce8129a352d0.zip |
Merge pull request #13355 from notomo/check-textlock-in-api
api: add textlock check
Diffstat (limited to 'test/functional/eval/api_functions_spec.lua')
-rw-r--r-- | test/functional/eval/api_functions_spec.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/eval/api_functions_spec.lua b/test/functional/eval/api_functions_spec.lua index ed110efeb4..7d09a652ba 100644 --- a/test/functional/eval/api_functions_spec.lua +++ b/test/functional/eval/api_functions_spec.lua @@ -47,6 +47,10 @@ describe('eval-API', function() eq('Vim(call):E5555: API call: Invalid buffer id: 17', err) end) + it('cannot change texts if textlocked', function() + command("autocmd TextYankPost <buffer> ++once call nvim_buf_set_lines(0, 0, -1, v:false, [])") + eq('Vim(call):E5555: API call: E523: Not allowed here', pcall_err(command, "normal! yy")) + end) it("use buffer numbers and windows ids as handles", function() local screen = Screen.new(40, 8) |