Christian Brabandt wrote:
> On Fr, 08 Mär 2019, Bram Moolenaar wrote: > > Patch 8.1.0999 > > Problem: Use register one too often and not properly tested. > > Solution: Do not always use register one when specifying a register. > > (closes #4085) Add more tests. > > Files: src/ops.c, src/testdir/test_registers.vim > > This partly reverts 7.3.649: > ,---- > | Problem: When 'clipboard' is set to "unnamed" small deletes end up in the > | numbered registers. (Ingo Karkat) > | Solution: Use the original register name to decide whether to put a delete > | in a numbered register. (Christian Brabandt) > `---- > > Doesn't that break again? It should not, since the register name is not used when deciding when to put the deleted text in register 1 (and shift the numbered registers). I vagually remember that the reasoning was that when a register is explicitly specified, then the text would always get put in register one. Now looking at this again, it doesn't make much sense. Whether register one is used should only depend on deleting more than one line, and the specific set of operators (which usually cover more than one line, but could also delete part of a line). Note that the patch that triggered this did the opposite, that when a register was specified that register one would not be used. I think that's wrong as well. As it is now after patch 999 it uses register one consistently. Only one existing test had to be adjusted for this patch, and it was not specificly testing this situation. Still, if this change breaks a plugin or someone's habits, we might need to reconsider. -- A fine is a tax for doing wrong. A tax is a fine for doing well. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
