Skip to content

Commit

Permalink
fix when trying to use in, end keyword line 1
Browse files Browse the repository at this point in the history
  • Loading branch information
iRyukizo committed Feb 8, 2021
1 parent f78ac4c commit 6b01359
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion indent/tiger.vim
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function! TgfIndent()
let pNum = prevnonblank(v:lnum - 1)
let pLine = getline(pNum)

if (thisLine !~ '\<let\>' && (thisLine =~ '\<in\>' || thisLine =~ '\<end\>'))
if (thisLine !~ '\<let\>' && (thisLine =~ '\<in\>' || thisLine =~ '\<end\>') && thisLine !~ '\<function\>' && thisLine !~ '\<:\>' && v:lnum != 1)
let lastN = FindLast('let', 'in', 'end')
return indent(lastN)
endif
Expand Down

0 comments on commit 6b01359

Please sign in to comment.