aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoys Ollivier <loys.ollivier@gmail.com>2020-01-22 10:38:39 +0100
committerBozhidar Batsov <bozhidar.batsov@gmail.com>2020-01-25 15:41:37 +0200
commita7c51da5d02e45ffff78093f3becb5527643a668 (patch)
tree84386a6425c54395e2af80f59289a47e2aacfe60
parent27a0da9cdc69dcfd5249aebb9ecfbe06d52b91b0 (diff)
[Fix #1488] Fix projectile-find-file-in-directory when in a subdir of projectile-project-root
The file-name should be expanded from directory and not from projectile-project-root. Signed-off-by: Loys Ollivier <loys.ollivier@gmail.com>
-rw-r--r--CHANGELOG.md1
-rw-r--r--projectile.el2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5b00d2d..326a392 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,7 @@
* [#1432](https://github.com/bbatsov/projectile/issues/1432): Support .NET project.
* [#1270](https://github.com/bbatsov/projectile/issues/1270): Fix running commands that don't have a default value.
* [#1482](https://github.com/bbatsov/projectile/issues/1482): Run a seperate grep buffer per project root
+* [#1488](https://github.com/bbatsov/projectile/issues/1488): Fix projectile-find-file-in-directory when in a subdir of projectile-project-root
## 2.0.0 (2019-01-01)
diff --git a/projectile.el b/projectile.el
index ccee4c6..1a79671 100644
--- a/projectile.el
+++ b/projectile.el
@@ -4109,7 +4109,7 @@ This command will first prompt for the directory the file is in."
;; target directory is in a project
(let ((file (projectile-completing-read "Find file: "
(projectile-dir-files directory))))
- (find-file (expand-file-name file (projectile-project-root)))
+ (find-file (expand-file-name file directory))
(run-hooks 'projectile-find-file-hook))
;; target directory is not in a project
(projectile-find-file))))