aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradrian5 <adrian5@users.noreply.github.com>2020-11-22 22:42:02 +0100
committeradrian5 <adrian5@users.noreply.github.com>2020-11-22 22:42:02 +0100
commit4230c546601365b35bc25e51236caa9645281f2f (patch)
tree6a052049ab24cbda07c4448038cd4db148218c9f
parente175cebf171f14c9929af596dbc9a210b5e59b7e (diff)
downloadrneovim-4230c546601365b35bc25e51236caa9645281f2f.tar.gz
rneovim-4230c546601365b35bc25e51236caa9645281f2f.tar.bz2
rneovim-4230c546601365b35bc25e51236caa9645281f2f.zip
xml.vim: patch runtime/indent to 4ceaa3a6e0b8cb299
vim/vim@4ceaa3a6e0b8cb2994c303041aedcbb60527cd61
-rw-r--r--runtime/indent/xml.vim7
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/indent/xml.vim b/runtime/indent/xml.vim
index ce992c589a..413a3ddb53 100644
--- a/runtime/indent/xml.vim
+++ b/runtime/indent/xml.vim
@@ -2,8 +2,9 @@
" Maintainer: Christian Brabandt <cb@256bit.org>
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
-" Last Changed: 2019 Oct 24
+" Last Changed: 2019 Dec 02
" Last Change:
+" 20191202 - Handle docbk filetype
" 20190726 - Correctly handle non-tagged data
" 20190204 - correctly handle wrap tags
" 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'
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'
return pind + shiftwidth()
endif
@@ -148,7 +149,7 @@ endfun
func! <SID>IsXMLContinuation(line)
" Checks, whether or not the line matches a start-of-tag
- return a:line !~ '^\s*<'
+ return a:line !~ '^\s*<' && &ft is# 'xml'
endfunc
func! <SID>HasNoTagEnd(line)