misc/vim/indent: Fix premature return
authorGiftpflanze <gifti@tools.wmflabs.org>
Tue, 23 Aug 2022 20:44:22 +0000 (20:44 +0000)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 23 Aug 2022 21:15:08 +0000 (14:15 -0700)
misc/vim/indent/factor.vim

index 0224e59237f677f020e2d622499159a1764d3a10..5d42de74f1c97343559bf130bd811132133c8d8a 100644 (file)
@@ -21,16 +21,16 @@ function! GetFactorIndent(lnum)
        let pline = getline(a:lnum-1)
        let pind = indent(a:lnum-1)
        if pline =~ '^:'
-               return pind + shiftwidth()
+               let pind += shiftwidth()
        endif
        if pline =~ ';$'
-               return pind - shiftwidth()
+               let pind -= shiftwidth()
        endif
        if pline =~ '[{[]$'
-               return pind + shiftwidth()
+               let pind += shiftwidth()
        endif
        if cline =~ '^\s*[\]}]'
-               return pind - shiftwidth()
+               let pind -= shiftwidth()
        endif
        return pind
 endfunction