From 5def18e53b9329147ff624e24b9a1f078615dede Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 14 Mar 2024 14:23:09 +0100 Subject: [PATCH] SourceAccessor: insert colon after prefix This allows clever editors/IDEs to discern the path more easily for Ctrl+Click navigate to functionality, e.g. when building .?ref=HEAD --- src/libutil/source-accessor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libutil/source-accessor.cc b/src/libutil/source-accessor.cc index 131e10e56..484190c9b 100644 --- a/src/libutil/source-accessor.cc +++ b/src/libutil/source-accessor.cc @@ -64,7 +64,7 @@ void SourceAccessor::setPathDisplay(std::string displayPrefix, std::string displ std::string SourceAccessor::showPath(const CanonPath & path) { - return displayPrefix + path.abs() + displaySuffix; + return displayPrefix + (displayPrefix.empty() ? "" : ":") + path.rel() + displaySuffix; } CanonPath SourceAccessor::resolveSymlinks(