fix shell fi always deindenting after newline

Always align fi to the line before before deindenting it
```
    ...
        test
    fi%( )
```
always deindent fi on `o`
This commit is contained in:
Ivan Tham 2020-07-22 22:27:12 +08:00 committed by GitHub
parent c2516f02f6
commit 1bbc88953e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,7 +128,7 @@ define-command -hidden sh-indent-on-new-line %[
# indent after then
try %{ execute-keys -draft <space> k <a-x> <a-k> then$ <ret> j <a-gt> }
# deindent after fi
try %{ execute-keys -draft <space> k <a-x> <a-k> fi$ <ret> <a-lt> j K <a-&> }
try %{ execute-keys -draft <space> k <a-x> <a-k> fi$ <ret> K <a-&> j <a-lt> j K <a-&> }
# deindent and reindent after else - deindent the else, then back
# down and return to the previous indent level.
try %{ execute-keys -draft <space> k <a-x> <a-k> else$ <ret> <a-lt> j }