Skip to content

Commit

Permalink
#73 fix indentation for comma in blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
raichoo committed Aug 23, 2016
1 parent fb11bdd commit 7a4fbdd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions indent/haskell.vim
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,16 @@ function! GetHaskellIndent()
call search(',', 'cW')
let l:n = s:getNesting(s:getHLStack(line('.'), col('.')))
call search('[([{]', 'bW')
let l:cl = line('.')
let l:cc = col('.')

while l:n != s:getNesting(s:getHLStack(line('.'), col('.')))
while l:n != s:getNesting(s:getHLStack(l:cl, l:cc)) || s:isSYN('haskellString', l:cl, l:cc) || s:isSYN('haskellChar', l:cl, l:cc)
call search('[([{]', 'bW')
let l:cl = line('.')
let l:cc = col('.')
endwhile

return col('.') - 1
return l:cc - 1
else
let l:s = s:indentGuard(match(l:line, ','), l:prevline)
if l:s > -1
Expand Down

0 comments on commit 7a4fbdd

Please sign in to comment.