diff options
| author | Sean Dewar <seandewar@users.noreply.github.com> | 2023-07-26 21:27:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-26 21:27:35 +0100 |
| commit | 8fe9f41f7f9da2009d11855ec0548b9dbe548a69 (patch) | |
| tree | 8759d99d2b3f034449a0ac73dd0d77736d1c2aec /test/functional/vimscript | |
| parent | ccf328172bac2b02f9bd19fa58e105958514a28a (diff) | |
| parent | a47be0b2d90b26905866faf5b7cc82d9c17be9bb (diff) | |
| download | rneovim-8fe9f41f7f9da2009d11855ec0548b9dbe548a69.tar.gz rneovim-8fe9f41f7f9da2009d11855ec0548b9dbe548a69.tar.bz2 rneovim-8fe9f41f7f9da2009d11855ec0548b9dbe548a69.zip | |
Merge pull request #24457 from seandewar/relax-cmdwin
feat(api): relax cmdwin restrictions for a few functions
Diffstat (limited to 'test/functional/vimscript')
| -rw-r--r-- | test/functional/vimscript/api_functions_spec.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/vimscript/api_functions_spec.lua b/test/functional/vimscript/api_functions_spec.lua index 6548548a9e..0a7e7c1137 100644 --- a/test/functional/vimscript/api_functions_spec.lua +++ b/test/functional/vimscript/api_functions_spec.lua @@ -73,9 +73,10 @@ describe('eval-API', function() -- Some functions checking textlock (usually those that may change the current window or buffer) -- also ought to not be usable in the cmdwin. + local old_win = meths.get_current_win() feed("q:") eq('E11: Invalid in command-line window; <CR> executes, CTRL-C quits', - pcall_err(meths.win_hide, 0)) + pcall_err(meths.set_current_win, old_win)) -- But others, like nvim_buf_set_lines(), which just changes text, is OK. curbufmeths.set_lines(0, -1, 1, {"wow!"}) |