Mercurial > vim
diff runtime/indent/sh.vim @ 16610:1eaf34420bb3
Update runtime files
commit https://github.com/vim/vim/commit/a6c27c47ddf081859659d7de1caec675147e466b
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 9 19:16:22 2019 +0200
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 09 May 2019 19:30:06 +0200 |
parents | b471858040bc |
children | 2704c4e3e20a |
line wrap: on
line diff
--- a/runtime/indent/sh.vim +++ b/runtime/indent/sh.vim @@ -3,10 +3,12 @@ " Maintainer: Christian Brabandt <cb@256bit.org> " Original Author: Nikolai Weibull <now@bitwi.se> " Previous Maintainer: Peter Aronoff <telemachus@arpinum.org> -" Latest Revision: 2019-03-25 +" Latest Revision: 2019-04-27 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-sh-indent " Changelog: +" 20190428 - De-indent fi correctly when typing with +" https://github.com/chrisbra/vim-sh-indent/issues/15 " 20190325 - Indent fi; correctly " https://github.com/chrisbra/vim-sh-indent/issues/14 " 20190319 - Indent arrays (only zsh and bash) @@ -127,7 +129,7 @@ function! GetShIndent() " Current line is a endif line, so get indent from start of "if condition" line " TODO: should we do the same for other "end" lines? if curline =~ '^\s*\%(fi\);\?\s*\%(#.*\)\=$' - let previous_line = searchpair('\<if\>', '', '\<fi\>', 'bnW') + let previous_line = searchpair('\<if\>', '', '\<fi\>\zs', 'bnW') if previous_line > 0 let ind = indent(previous_line) endif