Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix error jumping.

  • Loading branch information...
commit 28b97d140fd0780813c4f5b864089dcbfb3deea9 1 parent 52ff319
@chrisdone chrisdone authored
Showing with 9 additions and 1 deletion.
  1. +8 −1 haskell-interactive-mode.el
  2. +1 −0  haskell-process.el
View
9 haskell-interactive-mode.el
@@ -396,9 +396,16 @@
(with-current-buffer (haskell-session-interactive-buffer (haskell-session))
(if (progn (goto-char (line-beginning-position))
(looking-at "^[^:]+:[0-9]+:[0-9]+: "))
- (haskell-interactive-jump-to-error-line)
+ (progn (previous-line)
+ (haskell-interactive-jump-to-error-line))
(progn (goto-char (point-max))
(haskell-interactive-mode-error-backward)
(haskell-interactive-jump-to-error-line)))))
+(defun haskell-interactive-mode-reset-error (session)
+ "Reset the error cursor position."
+ (interactive)
+ (with-current-buffer (haskell-session-interactive-buffer session)
+ (goto-char (point-max))))
+
(provide 'haskell-interactive-mode)
View
1  haskell-process.el
@@ -204,6 +204,7 @@ changed. Restarts the process if that is the case."
"Load the current buffer file."
(interactive)
(save-buffer)
+ (haskell-interactive-mode-reset-error (haskell-session))
(haskell-process-file-loadish (concat "load " (buffer-file-name))))
;;;###autoload

0 comments on commit 28b97d1

Please sign in to comment.
Something went wrong with that request. Please try again.