Skip to content

Commit dfcb3a5

Browse files
committed
Bug fix: ignore 'do' matches inside words
1 parent f5ae0ac commit dfcb3a5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

indent/haskell.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function! GetHaskellIndent() abort
128128
endif
129129

130130
if nonblankline =~# '\v<do>\s*[[:alnum:](]'
131-
let i = strridx(nonblankline, 'do ')
131+
let i = match(nonblankline, '\v.*\zs<do>')
132132
return match(nonblankline, '\v<do>\s*\zs', i)
133133
endif
134134

test/do/double_do.in.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
do foo <- do bar <- baz
1+
do foo <- do undo <- baz
22
qux
33
quux

test/do/double_do.out.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
do foo <- do bar <- baz
1+
do foo <- do undo <- baz
22
qux
33
quux

0 commit comments

Comments
 (0)