Mercurial > vim
diff runtime/indent/make.vim @ 11160:d0a20101ecb2
Update runtime files.
commit https://github.com/vim/vim/commit/036986f1507d223549d110af300144468bd3a1f7
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 16 17:41:02 2017 +0100
Update runtime files.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 16 Mar 2017 17:45:05 +0100 |
parents | 1218c5353e2b |
children | e3ec2ec8841a |
line wrap: on
line diff
--- a/runtime/indent/make.vim +++ b/runtime/indent/make.vim @@ -48,14 +48,14 @@ function GetMakeIndent() if prev_prev_line =~ s:continuation_rx return indent(prev_lnum) elseif prev_line =~ s:rule_rx - return &sw + return shiftwidth() elseif prev_line =~ s:assignment_rx call cursor(prev_lnum, 1) if search(s:assignment_rx, 'W') != 0 return virtcol('.') - 1 else " TODO: ? - return &sw + return shiftwidth() endif else " TODO: OK, this might be a continued shell command, so perhaps indent @@ -66,7 +66,7 @@ function GetMakeIndent() " return indent(prev_lnum) + 2 " endif "endif - return indent(prev_lnum) + &sw + return indent(prev_lnum) + shiftwidth() endif elseif prev_prev_line =~ s:continuation_rx let folded_line = s:remove_continuation(prev_prev_line) . ' ' . s:remove_continuation(prev_line) @@ -102,13 +102,13 @@ function GetMakeIndent() return &ts endif elseif prev_line =~ s:conditional_directive_rx - return &sw + return shiftwidth() else let line = getline(v:lnum) if line =~ s:just_inserted_rule_rx return 0 elseif line =~ s:end_conditional_directive_rx - return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) - &sw + return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) - shiftwidth() else return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) endif