summaryrefslogtreecommitdiffstats
path: root/autoload/fish.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2019-09-04 15:55:58 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2019-09-04 15:55:58 +0200
commitcdd6d73e39c85feccdcace5c32b375de7ba25bae (patch)
tree3412ef089b48d8eac72f817cc0f015c61d9529c1 /autoload/fish.vim
parenta48874df4c2b0b8c4a7b45a165090b87a4969282 (diff)
downloadvim-polyglot-cdd6d73e39c85feccdcace5c32b375de7ba25bae.tar.gz
vim-polyglot-cdd6d73e39c85feccdcace5c32b375de7ba25bae.zip
Switch fish provider, fixes #408
Diffstat (limited to 'autoload/fish.vim')
-rw-r--r--autoload/fish.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/autoload/fish.vim b/autoload/fish.vim
index eb826bb8..5b86736e 100644
--- a/autoload/fish.vim
+++ b/autoload/fish.vim
@@ -11,15 +11,15 @@ function! fish#Indent()
let l:indent = 0
let l:prevline = getline(l:prevlnum)
if l:prevline =~# '\v^\s*switch>'
- let l:indent = l:shiftwidth * 2
+ return indent(l:prevlnum) + l:shiftwidth
elseif l:prevline =~# '\v^\s*%(begin|if|else|while|for|function|case)>'
let l:indent = l:shiftwidth
endif
let l:line = getline(v:lnum)
if l:line =~# '\v^\s*end>'
- return indent(v:lnum) - (l:indent ==# 0 ? l:shiftwidth : l:indent)
+ return indent(l:prevlnum) - (l:indent ==# 0 ? l:shiftwidth : l:indent)
elseif l:line =~# '\v^\s*%(case|else)>'
- return indent(v:lnum) - l:shiftwidth
+ return indent(l:prevlnum) - l:shiftwidth
endif
return indent(l:prevlnum) + l:indent
endfunction