Ingo Karkat wrote: > On 16-Jul-2013 16:21 +0200, glts wrote: > > > On Tue, Jul 16, 2013 at 4:17 PM, Ingo Karkat <[email protected]> wrote: > >> Hello Vim developers, > >> > >> This was first reported on Stack Overflow: > >> > >> http://stackoverflow.com/questions/16710886/why-does-3dd-not-work-from-the-last-line-in-vim > >> > >> vim -N -u NONE -c "for i in range(1,3)|call setline(i,i)|endfor" > >> :normal! 3G3dd > >> " BUG: This just beeps, nothing gets deleted. Expected: Current last line > >> gets deleted. > >> :normal! 2G3dd > >> " OK: This deletes lines 2 and 3, as expected, even though the count is > >> larger than the number of lines. > >> :undo > >> :3delete 3 > >> " OK: The equivalent Ex command correctly deletes the last line. > >> > >> Reproducible on Vim 7.4a.24 on Linux/x64, and also on ancient Vim 7.0.000 > >> on Windows/x86. > > > > Did you see this? > > https://groups.google.com/d/msg/vim_dev/3T6qX8qXu20/QNEoteWEDzAJ > > To quote Bram: > This is intentionally implemented this way in cursor_down(). > It doesn't say so, but it is most likely to be Vi compatible. > > Then isn't this a case for 'cpoptions', as with all the other Vi > peculiarities?! > > There are now at least 4 people (the submitter on SO, one who answered, > myself, and Nikolay from the linked thread) who consider this to be a > bug. If the group of people where this doesn't fit their mental model is > way larger than those who know about this (without diving into the > source code), and there are no convincing reasons for keeping the > peculiarity, and the probability of someone actually relying on the > behavior goes against zero, that's a strong case for fixing it (when in > :set nocompatible).
Maybe it's a bug that when you tell Vim to delete lines that don't exist it doesn't beep and do nothing. But it's always been that way and there is no reason why it's more of a problem now then 10 years ago. So let's just leave it. -- Lower life forms have more fun! /// 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/groups/opt_out.
