diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-04-07 14:27:47 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-04-07 21:42:11 +0800 |
commit | 64802da6c4304a2700d9471d17c0aae143d9aab1 (patch) | |
tree | dde71e2d365e1d1eb49453eaf83fd3e03efc2619 /test/functional/editor/macro_spec.lua | |
parent | 2a574f7aaaf5cd0803faa9e4337bf3e21e8b8d2a (diff) | |
download | rneovim-64802da6c4304a2700d9471d17c0aae143d9aab1.tar.gz rneovim-64802da6c4304a2700d9471d17c0aae143d9aab1.tar.bz2 rneovim-64802da6c4304a2700d9471d17c0aae143d9aab1.zip |
fix(event-loop): check if executed register has ended
Diffstat (limited to 'test/functional/editor/macro_spec.lua')
-rw-r--r-- | test/functional/editor/macro_spec.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/editor/macro_spec.lua b/test/functional/editor/macro_spec.lua index f97fe44ba2..d4cf6b28fd 100644 --- a/test/functional/editor/macro_spec.lua +++ b/test/functional/editor/macro_spec.lua @@ -6,6 +6,7 @@ local feed = helpers.feed local clear = helpers.clear local expect = helpers.expect local command = helpers.command +local funcs = helpers.funcs local meths = helpers.meths local insert = helpers.insert local curbufmeths = helpers.curbufmeths @@ -54,6 +55,19 @@ describe('immediately after a macro has finished executing,', function() command([[let @a = 'gg0']]) end) + describe('reg_executing() from RPC returns an empty string', function() + it('if the macro does not end with a <Nop> mapping', function() + feed('@a') + eq('', funcs.reg_executing()) + end) + + it('if the macro ends with a <Nop> mapping', function() + command('nnoremap 0 <Nop>') + feed('@a') + eq('', funcs.reg_executing()) + end) + end) + describe('characters from a mapping are not treated as a part of the macro #18015', function() before_each(function() command('nnoremap s qa') |