Mercurial > vim
diff runtime/indent/sh.vim @ 6153:1e8ebf870720
Updated runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 22 Aug 2014 19:21:47 +0200 |
parents | 7818ca6de3d0 |
children | 2def7b25de60 |
line wrap: on
line diff
--- a/runtime/indent/sh.vim +++ b/runtime/indent/sh.vim @@ -2,7 +2,7 @@ " Language: Shell Script " Maintainer: Peter Aronoff <telemachus@arpinum.org> " Original Author: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2013-11-28 +" Latest Revision: 2014-08-22 if exists("b:did_indent") finish @@ -91,7 +91,9 @@ function! GetShIndent() if s:is_case(pine) let ind = indent(lnum) + s:indent_value('case-labels') else - let ind -= s:indent_value('case-statements') - s:indent_value('case-breaks') + let ind -= (s:is_case_label(pine, lnum) && s:is_case_ended(pine) ? + \ 0 : s:indent_value('case-statements')) - + \ s:indent_value('case-breaks') endif elseif s:is_case_break(line) let ind -= s:indent_value('case-breaks')