diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/functional/shada/history_spec.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/shada/history_spec.lua b/test/functional/shada/history_spec.lua index 1ad230f244..39a5f8df7e 100644 --- a/test/functional/shada/history_spec.lua +++ b/test/functional/shada/history_spec.lua @@ -116,6 +116,12 @@ describe('ShaDa support code', function() nvim_feed('gg0n') eq({ 0, 2, 3, 0 }, fn.getpos('.')) eq(1, api.nvim_get_vvar('searchforward')) + -- Autocommands shouldn't cause search pattern to change + nvim_command('autocmd User * :') + nvim_command('doautocmd User') + nvim_feed('gg0n') + eq({ 0, 2, 3, 0 }, fn.getpos('.')) + eq(1, api.nvim_get_vvar('searchforward')) end) it('dumps and loads last search pattern with offset and backward direction', function() @@ -130,6 +136,12 @@ describe('ShaDa support code', function() nvim_feed('G$n') eq({ 0, 2, 3, 0 }, fn.getpos('.')) eq(0, api.nvim_get_vvar('searchforward')) + -- Autocommands shouldn't cause search pattern to change + nvim_command('autocmd User * :') + nvim_command('doautocmd User') + nvim_feed('G$n') + eq({ 0, 2, 3, 0 }, fn.getpos('.')) + eq(0, api.nvim_get_vvar('searchforward')) end) it('saves v:hlsearch=1', function() |