diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2019-08-02 15:10:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-02 15:10:04 +0200 |
| commit | 7cf0119c6857846fd1f254feb237f6137f140856 (patch) | |
| tree | 1fb4d7c43a6cd86d7758bc0dc2d2aa23240b5947 /runtime/indent/html.vim | |
| parent | b92a5bc3c4bdfddfc21638556ace6ef3fd90155c (diff) | |
| parent | 532ee54a42a294073e8b441f3ce5a050d16963a2 (diff) | |
| download | rneovim-7cf0119c6857846fd1f254feb237f6137f140856.tar.gz rneovim-7cf0119c6857846fd1f254feb237f6137f140856.tar.bz2 rneovim-7cf0119c6857846fd1f254feb237f6137f140856.zip | |
Merge #10666 from justinmk/vim-runtime
vim-patch: runtime updates
Diffstat (limited to 'runtime/indent/html.vim')
| -rw-r--r-- | runtime/indent/html.vim | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim index 1a8177050a..1d2043ae9e 100644 --- a/runtime/indent/html.vim +++ b/runtime/indent/html.vim @@ -2,7 +2,7 @@ " Header: "{{{ " Maintainer: Bram Moolenaar " Original Author: Andy Wokula <anwoku@yahoo.de> -" Last Change: 2018 Mar 28 +" Last Change: 2019 Mar 20 " Version: 1.0 " Description: HTML indent script with cached state for faster indenting on a " range of lines. @@ -902,12 +902,19 @@ func! s:InsideTag(foundHtmlString) "{{{ if a:foundHtmlString " Inside an attribute string. - " Align with the previous line or use an external function. + " Align with the opening quote or use an external function. let lnum = v:lnum - 1 if lnum > 1 if exists('b:html_indent_tag_string_func') return b:html_indent_tag_string_func(lnum) endif + " If there is a double quote in the previous line, indent with the + " character after it. + if getline(lnum) =~ '"' + call cursor(lnum, 0) + normal f" + return virtcol('.') + endif return indent(lnum) endif endif |