Permalink
Browse files

Fix filename linking from interactive mode for non-project-relative p…

…aths.
  • Loading branch information...
1 parent 63ead61 commit 9121d70ea67f43c0b21b821fff593f846b4d9854 @chrisdone chrisdone committed Oct 13, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/hs-interactive-mode.el
@@ -181,8 +181,11 @@
(col (match-string 3 line)))
(let* ((cabal-path (hs-project-cabal-dir project))
(src-path (hs-process-current-dir (hs-project-process project)))
- (cabal-relative-file (concat cabal-path "/" file))
- (src-relative-file (concat src-path "/" file)))
+ (cabal-relative-file (concat cabal-path "/"
+ (file-relative-name file
+ cabal-path)))
+ (src-relative-file (concat src-path "/" (file-relative-name file
+ src-path))))
(let ((file (cond ((file-exists-p cabal-relative-file)
cabal-relative-file)
((file-exists-p src-relative-file)

0 comments on commit 9121d70

Please sign in to comment.