xml.vim: patch runtime/indent to 4ceaa3a6e0b8cb299

vim/vim@4ceaa3a6e0
This commit is contained in:
adrian5 2020-11-22 22:42:02 +01:00
parent e175cebf17
commit 4230c54660

View File

@ -2,8 +2,9 @@
" Maintainer: Christian Brabandt <cb@256bit.org> " Maintainer: Christian Brabandt <cb@256bit.org>
" Repository: https://github.com/chrisbra/vim-xml-ftplugin " Repository: https://github.com/chrisbra/vim-xml-ftplugin
" Previous Maintainer: Johannes Zellner <johannes@zellner.org> " Previous Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Changed: 2019 Oct 24 " Last Changed: 2019 Dec 02
" Last Change: " Last Change:
" 20191202 - Handle docbk filetype
" 20190726 - Correctly handle non-tagged data " 20190726 - Correctly handle non-tagged data
" 20190204 - correctly handle wrap tags " 20190204 - correctly handle wrap tags
" https://github.com/chrisbra/vim-xml-ftplugin/issues/5 " https://github.com/chrisbra/vim-xml-ftplugin/issues/5
@ -134,7 +135,7 @@ fun! XmlIndentGet(lnum, use_syntax_check)
if syn_name_end =~ 'Comment' && syn_name_start =~ 'Comment' if syn_name_end =~ 'Comment' && syn_name_start =~ 'Comment'
return <SID>XmlIndentComment(a:lnum) return <SID>XmlIndentComment(a:lnum)
elseif empty(syn_name_start) && empty(syn_name_end) elseif empty(syn_name_start) && empty(syn_name_end) && a:use_syntax_check
" non-xml tag content: use indent from 'autoindent' " non-xml tag content: use indent from 'autoindent'
return pind + shiftwidth() return pind + shiftwidth()
endif endif
@ -148,7 +149,7 @@ endfun
func! <SID>IsXMLContinuation(line) func! <SID>IsXMLContinuation(line)
" Checks, whether or not the line matches a start-of-tag " Checks, whether or not the line matches a start-of-tag
return a:line !~ '^\s*<' return a:line !~ '^\s*<' && &ft is# 'xml'
endfunc endfunc
func! <SID>HasNoTagEnd(line) func! <SID>HasNoTagEnd(line)