justinmk / vim-sneak

The missing motion for Vim :athletic_shoe:
http://www.vim.org/scripts/script.php?script_id=4809
MIT License
3.26k stars 88 forks source link

repetition clobbers registers #293

Open dmwit opened 2 years ago

dmwit commented 2 years ago

When I use . to repeat a deletion using a vim-sneak motion, it clobbers the most-recently used register, even when that register was not used for the action being repeated. Here's a short, crisp test: open a file and insert the text

good_bad_

and position your cursor at the start of the line. Then press the following keys (or your setup's equivalents, I guess):

"ayf_df_."ap

In other words: yank good_ into register a, delete to the first _ (without writing to any register), repeat, then dump the current contents of a. I expect a to still have the content it had from the very first yank, namely, good_; but instead I observe that it contains bad_.