Hello,
On the latest hg master (7.4.567), the head of the `HtmlIndent` function reads:
" THE MAIN INDENT FUNCTION. Return the amount of indent for v:lnum.
func! HtmlIndent()
"{{{
if prevnonblank(v:lnum - 1) <= 1
" First non-blank line has no indent.
return 0
endif
I believe that it should be `prevnonblank(v:lnum - 1) <= 0`. Otherwise, the tag
on line 2 gets no indentation (the previous non-blank line can be an opening
tag on line 1). This wouldn't be noticeable if the first line is a doctype or
`<html>`, whose children don't get any indent anyway, but in this case it ends
up being an issue:
<div>
<div></div>
</div>
I noticed that Bram is the last one to touch this area in hg commit 6032,
"Overhauled HTML indent script.", which is why I'm writing here and not
directly to Andy Wokula.
Best Regards,
Andrew
--
--
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.