diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-17 16:07:22 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-17 16:07:22 +0100 |
commit | d09091d4955c5f41de69928f2db85611ed54ed23 (patch) | |
tree | 9ae3f6b6c693334f58138064918222640c049ff5 /runtime/indent/eruby.vim | |
parent | bb1969b6ab28120c93b77817e7b6075e1aecf663 (diff) |
Update runtime files.
Diffstat (limited to 'runtime/indent/eruby.vim')
-rw-r--r-- | runtime/indent/eruby.vim | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/runtime/indent/eruby.vim b/runtime/indent/eruby.vim index 5058325495..6ff15ab958 100644 --- a/runtime/indent/eruby.vim +++ b/runtime/indent/eruby.vim @@ -3,6 +3,7 @@ " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2019 Jan 06 if exists("b:did_indent") finish @@ -12,7 +13,7 @@ runtime! indent/ruby.vim unlet! b:did_indent setlocal indentexpr= -if exists("b:eruby_subtype") +if exists("b:eruby_subtype") && b:eruby_subtype != '' && b:eruby_subtype !=# 'eruby' exe "runtime! indent/".b:eruby_subtype.".vim" else runtime! indent/html.vim @@ -47,7 +48,11 @@ set cpo&vim function! GetErubyIndent(...) " The value of a single shift-width - let sw = shiftwidth() + if exists('*shiftwidth') + let sw = shiftwidth() + else + let sw = &sw + endif if a:0 && a:1 == '.' let v:lnum = line('.') @@ -91,6 +96,7 @@ function! GetErubyIndent(...) let ind = ind + sw endif if line !~# '^\s*<%' && line =~# '%>\s*$' && line !~# '^\s*end\>' + \ && synID(v:lnum, match(cline, '\S') + 1, 1) != hlID('htmlEndTag') let ind = ind - sw endif if cline =~# '^\s*[-=]\=%>\s*$' |