From 7db740c2afc5808308c93f116d6f7e87f85e1792 Mon Sep 17 00:00:00 2001 From: Hiromi Ishii Date: Sun, 13 Sep 2015 16:42:48 +0900 Subject: [PATCH] Fixed #561 --- elisp/ghc-check.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/elisp/ghc-check.el b/elisp/ghc-check.el index f795c58..181b62e 100644 --- a/elisp/ghc-check.el +++ b/elisp/ghc-check.el @@ -165,12 +165,17 @@ nil do not display errors/warnings. (err (ghc-hilit-info-get-err info)) (hole (ghc-hilit-info-get-hole info)) (coln (ghc-hilit-info-get-coln info)) + (is-same-file + (or (file-equal-p ofile file) + (string= (file-truename ofile) (file-truename file))) + ; In case non-existent + ) beg end ovl) ;; FIXME: This is the Shlemiel painter's algorithm. ;; If this is a bottleneck for a large code, let's fix. (goto-char (point-min)) (cond - ((string= (file-truename ofile) (file-truename file)) + (is-same-file (if hole (progn (forward-line (1- line))