Mercurial > vim
diff runtime/indent/html.vim @ 14637:0ecb909e3249
Update runtime files.
commit https://github.com/vim/vim/commit/fc65cabb15d0236bce001ad78e12a40511caf941
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 28 22:58:02 2018 +0200
Update runtime files.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 28 Aug 2018 23:00:08 +0200 |
parents | 5923f64c8f5b |
children | 2b30a2b4bde2 |
line wrap: on
line diff
--- a/runtime/indent/html.vim +++ b/runtime/indent/html.vim @@ -663,7 +663,7 @@ func! s:CSSIndent() else let cur_hasfield = curtext =~ '^\s*[a-zA-Z0-9-]\+:' let prev_unfinished = s:CssUnfinished(prev_text) - if !cur_hasfield && (prev_hasfield || prev_unfinished) + if prev_unfinished " Continuation line has extra indent if the previous line was not a " continuation line. let extra = shiftwidth() @@ -716,9 +716,13 @@ func! s:CSSIndent() endfunc "}}} " Inside <style>: Whether a line is unfinished. +" tag: +" tag: blah +" tag: blah && +" tag: blah || func! s:CssUnfinished(text) "{{{ - return a:text =~ '\s\(||\|&&\|:\)\s*$' + return a:text =~ '\(||\|&&\|:\|\k\)\s*$' endfunc "}}} " Search back for the first unfinished line above "lnum".