Christian Brabandt wrote:
> On Di, 10 Mär 2015, Gary Johnson wrote:
>
> > When I type 0 (zero) followed by Ctrl-D on a line that's indented by
> > more than one 'shiftwidth', I expect all the indentation of the
> > current line to be deleted and the 0 deleted, as described in ":help
> > i_0_CTRL-D". However, if a CursorHoldI autocommand is defined and
> > 'updatetime' elapses between the typing of the 0 and the typing of
> > the Ctrl-D, then the current line is shifted only one 'shiftwidth'
> > to the left and the 0 is not deleted.
>
> This happens, because in edit mode, Vim remembers the last entered char.
> In the case of entering ctrl-d in insert mode, this is used to decide
> whether to remove all indent or only one level. Now when the CursorHold
> kicks in, the last received char when processing the Ctrl-D command will
> then be K_CURSORHOLD and not the '0'.
>
> Here is a patch:
Thanks! I'm glad it's this simple.
--
GUARD #1: Where'd you get the coconut?
ARTHUR: We found them.
GUARD #1: Found them? In Mercea? The coconut's tropical!
ARTHUR: What do you mean?
GUARD #1: Well, this is a temperate zone.
The Quest for the Holy Grail (Monty Python)
/// 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.