Copy selected path in find-and-replace:copy-path
MODIFY
lib/project/results-view.js
lib/project/results-view.js
@@ -379,11 +379,8 @@ class ResultsView {
}
}
- copyPath(event) {
- const pathElement = event.target.closest('.path');
- if (!pathElement) return;
-
- const filePath = event.target.dataset.path;
+ copyPath() {
+ const {filePath} = this.searchResults[this.selectedResultIndex];
let [rootPath, relativePath] = atom.project.relativizePath(filePath);
if (rootPath && atom.project.getDirectories().length > 1) {
relativePath = path.join(path.basename(rootPath), relativePath);

Copy selected path in find-and-replace:copy-path