Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions indent/haskell.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
" Filename: indent/haskell.vim
" Author: itchyny
" License: MIT License
" Last Change: 2024/11/01 20:51:18.
" Last Change: 2025/03/03 09:45:31.
" =============================================================================

if exists('b:did_indent')
Expand Down Expand Up @@ -128,7 +128,7 @@ function! GetHaskellIndent() abort
endif

if nonblankline =~# '\v<do>\s*[[:alnum:](]'
return match(nonblankline, '\v<do>\s*\zs\S')
return match(nonblankline, '\v.*<do>\s*\zs')
endif

if line =~# '\v<if>' && line !~# '\v^\s*#'
Expand Down
3 changes: 3 additions & 0 deletions test/do/double_do.in.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
do foo <- do undo <- baz
qux
quux
3 changes: 3 additions & 0 deletions test/do/double_do.out.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
do foo <- do undo <- baz
qux
quux