branch: elpa/haskell-mode commit 333205066754348b3dd47c5ce834757dd1bbdf48 Merge: 98ba392 fa14bc6 Author: Steve Purcell <st...@sanityinc.com> Commit: GitHub <nore...@github.com>
Merge pull request #1759 from sirlensalot/pr-fix-reload-lint-other-buffer Fix linting for current module when reloading another module --- haskell-load.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/haskell-load.el b/haskell-load.el index f33987b..7714ba7 100644 --- a/haskell-load.el +++ b/haskell-load.el @@ -542,11 +542,13 @@ When MODULE-BUFFER is non-NIL, paint error overlays." (line (plist-get location :line)) (col1 (plist-get location :col))) (when (and module-buffer haskell-process-show-overlays) - (haskell-check-paint-overlay - module-buffer - (string= (file-truename (buffer-file-name module-buffer)) - (file-truename file)) - line error-msg file type nil col1)) + ;; conform default-directory to session current-dir for 'file-truename' + (let ((default-directory (haskell-session-current-dir session))) + (haskell-check-paint-overlay + module-buffer + (string= (file-truename (buffer-file-name module-buffer)) + (file-truename file)) + line error-msg file type nil col1))) (if return-only (list :file file :line line :col col1 :msg error-msg :type type) (progn (funcall (cl-case type