Use shiftwidth() when available

Closes https://github.com/tpope/vim-haml/issues/76
This commit is contained in:
Tim Pope
2016-02-11 12:43:59 -05:00
parent 7d86692010
commit 1f2e47c78c
2 changed files with 4 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ function! GetSassIndent()
let indent = indent(lnum)
let cindent = indent(v:lnum)
if line !~ s:property && line !~ s:extend && cline =~ s:property
return indent + &sw
return indent + (exists('*shiftwidth') ? shiftwidth() : &sw)
else
return -1
endif