Skip to content

Commit ed31b18

Browse files
Fix haskell-interactive-jump-to-error-line, which I broke :-(
1 parent b257273 commit ed31b18

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

haskell-interactive-mode.el

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -193,27 +193,27 @@ Key bindings:
193193
(let ((orig-line (buffer-substring-no-properties (line-beginning-position)
194194
(line-end-position))))
195195
(and (string-match "^\\([^:]+\\):\\([0-9]+\\):\\([0-9]+\\):" orig-line)
196-
(let ((file (match-string 1 orig-line))
197-
(line (match-string 2 orig-line))
198-
(col (match-string 3 orig-line)))
199-
(let* ((session (haskell-session))
200-
(cabal-path (haskell-session-cabal-dir session))
201-
(src-path (haskell-session-current-dir session))
202-
(cabal-relative-file (expand-file-name file cabal-path))
203-
(src-relative-file (expand-file-name file src-path))))
204-
(let ((file (cond ((file-exists-p cabal-relative-file)
205-
cabal-relative-file)
206-
((file-exists-p src-relative-file)
207-
src-relative-file))))
208-
(when file
209-
(other-window 1)
210-
(find-file file)
211-
(haskell-interactive-bring)
212-
(goto-char (point-min))
213-
(forward-line (1- (string-to-number line)))
214-
(goto-char (+ (point) (string-to-number col)))
215-
(haskell-mode-message-line orig-line)
216-
t)))))))
196+
(let* ((file (match-string 1 orig-line))
197+
(line (match-string 2 orig-line))
198+
(col (match-string 3 orig-line))
199+
(session (haskell-session))
200+
(cabal-path (haskell-session-cabal-dir session))
201+
(src-path (haskell-session-current-dir session))
202+
(cabal-relative-file (expand-file-name file cabal-path))
203+
(src-relative-file (expand-file-name file src-path)))
204+
(let ((file (cond ((file-exists-p cabal-relative-file)
205+
cabal-relative-file)
206+
((file-exists-p src-relative-file)
207+
src-relative-file))))
208+
(when file
209+
(other-window 1)
210+
(find-file file)
211+
(haskell-interactive-bring)
212+
(goto-char (point-min))
213+
(forward-line (1- (string-to-number line)))
214+
(goto-char (+ (point) (string-to-number col)))
215+
(haskell-mode-message-line orig-line)
216+
t))))))
217217

218218
(defun haskell-interactive-mode-beginning ()
219219
"Go to the start of the line."

0 commit comments

Comments
 (0)