Chris Morgan wrote:

> File: runtime/indent/python.vim
> 
> When checking for a colon at the end of a statement to decide whether
> to indent the next line, it strips trailing comments; however, the
> syntax group can be pythonTodo rather than pythonComment, which it was
> not detecting.
> 
> Thus, a line like this:
> 
>     if True:  # TODO
> 
> would lead to the next line not being indented an extra level, which
> is not correct.
> 
> The simple solution (employed here) is to change the check for
> `Comment$` to `(Comment|Todo)$`. A more complex but
> more-correct-in-case-of-user-extensions-to-the-syntax solution would
> check the whole synstack, but I deemed that as probably unnecessary.
> I'm happy to write such a thing if desired, though.
> 
> This has been an issue for quite some time, probably since the
> beginning of that syntax file.

Looks like a good solution.  Thanks, I'll include it.

-- 
Every time I lose weight, it finds me again!

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