aboutsummaryrefslogtreecommitdiff
path: root/runtime/indent/html.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/indent/html.vim')
-rw-r--r--runtime/indent/html.vim8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim
index ba043e968a..6c866594c5 100644
--- 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".