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).
-- regards, ingo
--
--
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.