Tor Perkins wrote:

> Given this text (two lines with four leading spaces on each):
> 
>     xx 1111 1111 1111
>     2222
> 
> And, given these settings (auto format + second line indent):
> 
>   :set textwidth=25
>   :set formatoptions=a2
> 
> Inserting a space on line 2 column 1 results in a cursor positioning bug, to
> wit, the cursor is unexpectedly moved near the end of line 1.
> 
> This does not happen if comments are present and we 'set fo+=q'.
> 
> The problem is that ops.c:format_lines() has the requisite code needed
> to handle this for the comment case only.  In the non-comment case,
> the second_indent variable can be used instead of the next_leader_len
> variable to achieve the same result as seen in this excerpt from the
> attached patch:

Thanks for the patch.  I'll look into it.


-- 
hundred-and-one symptoms of being an internet addict:
161. You get up before the sun rises to check your e-mail, and you
     find yourself in the very same chair long after the sun has set.

 /// 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.

Raspunde prin e-mail lui