Skip to content

Commit

Permalink
fix: update virtual path before displaying in the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
devvaannsh committed Jan 9, 2025
1 parent 6a5f306 commit 4e23546
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/extensionsIntegrated/NavigationAndHistory/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,14 @@ define(function (require, exports, module) {
}

$newItem.data("path", value.file);

// convert the virtual path to display path
var displayPath = Phoenix.app.getDisplayPath(value.file);

$newItem.data("paneId", value.paneId);
$newItem.data("cursor", value.cursor);
$newItem.data("file", fileEntry);
$newItem.attr("title", value.file);
$newItem.attr("title", displayPath); // this is for the tooltip

if (isPaneLabelReqd && value.paneId) {
$newItem.addClass(value.paneId);
Expand Down Expand Up @@ -442,8 +446,12 @@ define(function (require, exports, module) {
var $scope = $(event.target).parent();
$("#mrof-container #mrof-list > li.highlight").removeClass("highlight");
$(event.target).parent().addClass("highlight");
$mrofContainer.find("#recent-file-path").text($scope.data("path"));
$mrofContainer.find("#recent-file-path").attr('title', ($scope.data("path")));

// convert the virtual path to display path
var displayPath = Phoenix.app.getDisplayPath($scope.data("path"));
$mrofContainer.find("#recent-file-path").text(displayPath);
$mrofContainer.find("#recent-file-path").attr('title', displayPath);

$currentContext = $scope;
}

Expand Down

0 comments on commit 4e23546

Please sign in to comment.