summaryrefslogtreecommitdiffstats
path: root/runtime/indent/make.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-03-16 17:41:02 +0100
committerBram Moolenaar <Bram@vim.org>2017-03-16 17:41:02 +0100
commit036986f1507d223549d110af300144468bd3a1f7 (patch)
tree4ceb878909e769f23d6deeae3bbb03d16e974f0d /runtime/indent/make.vim
parent8820b48654b62472821d9b155fe03ab7ac13a05c (diff)
Update runtime files.
Diffstat (limited to 'runtime/indent/make.vim')
-rw-r--r--runtime/indent/make.vim10
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/indent/make.vim b/runtime/indent/make.vim
index 2a4b4580a9..66a8a40173 100644
--- 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