From 2dc27a8a78512269e4672bffcb11ede1c26fbd47 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 26 Apr 2016 14:16:09 -0400 Subject: [PATCH] shada: Remember whether "0 or "1 was the unnamed register Ref #4645 --- test/functional/shada/registers_spec.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/functional/shada/registers_spec.lua b/test/functional/shada/registers_spec.lua index fc812f799c..d8e9892c76 100644 --- a/test/functional/shada/registers_spec.lua +++ b/test/functional/shada/registers_spec.lua @@ -148,4 +148,14 @@ describe('ShaDa support code', function() eq({{'\171«'}, 'v'}, getreg('e')) end) + it('remembers which register was the unnamed register when loading', + function() + setreg('0', {'zero'}, 'c') + setreg('1', {'one'}, 'c') + nvim_command('qall') + reset() + eq({{'zero'}, 'v'}, getreg('0')) + eq({{'one'}, 'v'}, getreg('1')) + eq({{'one'}, 'v'}, getreg('"')) + end) end)