Skip to content

Commit 83f8e4b

Browse files
committed
fix: update virtual path to display path before displaying in UI
1 parent cbb193c commit 83f8e4b

File tree

1 file changed

+11
-3
lines changed
  • src/extensionsIntegrated/NavigationAndHistory

1 file changed

+11
-3
lines changed

src/extensionsIntegrated/NavigationAndHistory/main.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,14 @@ define(function (require, exports, module) {
311311
}
312312

313313
$newItem.data("path", value.file);
314+
315+
// convert the virtual path to display path
316+
var displayPath = Phoenix.app.getDisplayPath(value.file);
317+
314318
$newItem.data("paneId", value.paneId);
315319
$newItem.data("cursor", value.cursor);
316320
$newItem.data("file", fileEntry);
317-
$newItem.attr("title", value.file);
321+
$newItem.attr("title", displayPath); // this is for the tooltip
318322

319323
if (isPaneLabelReqd && value.paneId) {
320324
$newItem.addClass(value.paneId);
@@ -442,8 +446,12 @@ define(function (require, exports, module) {
442446
var $scope = $(event.target).parent();
443447
$("#mrof-container #mrof-list > li.highlight").removeClass("highlight");
444448
$(event.target).parent().addClass("highlight");
445-
$mrofContainer.find("#recent-file-path").text($scope.data("path"));
446-
$mrofContainer.find("#recent-file-path").attr('title', ($scope.data("path")));
449+
450+
// convert the virtual path to display path
451+
var displayPath = Phoenix.app.getDisplayPath($scope.data("path"));
452+
$mrofContainer.find("#recent-file-path").text(displayPath);
453+
$mrofContainer.find("#recent-file-path").attr('title', displayPath);
454+
447455
$currentContext = $scope;
448456
}
449457

0 commit comments

Comments
 (0)