Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7a4fbdd

Browse files
committedAug 23, 2016
#73 fix indentation for comma in blocks
1 parent fb11bdd commit 7a4fbdd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎indent/haskell.vim

+6-2
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,16 @@ function! GetHaskellIndent()
156156
call search(',', 'cW')
157157
let l:n = s:getNesting(s:getHLStack(line('.'), col('.')))
158158
call search('[([{]', 'bW')
159+
let l:cl = line('.')
160+
let l:cc = col('.')
159161

160-
while l:n != s:getNesting(s:getHLStack(line('.'), col('.')))
162+
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)
161163
call search('[([{]', 'bW')
164+
let l:cl = line('.')
165+
let l:cc = col('.')
162166
endwhile
163167

164-
return col('.') - 1
168+
return l:cc - 1
165169
else
166170
let l:s = s:indentGuard(match(l:line, ','), l:prevline)
167171
if l:s > -1

0 commit comments

Comments
 (0)
Please sign in to comment.