Skip to content

Commit f64ec28

Browse files
committed
Filter only sections bearing targets - fixes #534
1 parent 4c58749 commit f64ec28

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

haskell-cabal.el

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,11 @@ OTHER-WINDOW use `find-file-other-window'."
455455
(goto-char (point-min))
456456
(haskell-cabal-next-section)
457457
(while (not (eobp))
458-
(push (haskell-cabal-section-value (haskell-cabal-section)) matches)
458+
(if (haskell-cabal-source-section-p (haskell-cabal-section))
459+
(let ((val (haskell-cabal-section-value (haskell-cabal-section))))
460+
(if (string= val "")
461+
(push "library" matches)
462+
(push val matches))))
459463
(haskell-cabal-next-section))
460464
(reverse matches))))))
461465

0 commit comments

Comments
 (0)