Skip to content

Commit

Permalink
Removed leading …/ from displayed paths to mirrord configs (#312)
Browse files Browse the repository at this point in the history
* Removed leading ellipsis

* Changelog
  • Loading branch information
Razz4780 authored Dec 17, 2024
1 parent 4e3e5d5 commit cf04ae5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/311.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed leading `…/` from displayed paths to mirrord config files.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.intellij.openapi.fileEditor.FileEditorManager
import com.intellij.openapi.project.*
import com.intellij.openapi.ui.popup.JBPopup
import com.intellij.openapi.ui.popup.JBPopupFactory
import com.intellij.openapi.util.text.StringUtil.ELLIPSIS
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.vfs.VirtualFileManager
import com.intellij.util.indexing.*
Expand Down Expand Up @@ -64,7 +65,8 @@ abstract class TogglePopupAction : ToggleAction() {
}

fun VirtualFile.relativePath(project: Project): String {
return calcRelativeToProjectPath(this, project, includeFilePath = true, keepModuleAlwaysOnTheLeft = true)
return calcRelativeToProjectPath(this, project, includeFilePath = true, keepModuleAlwaysOnTheLeft = false)
.substringAfter("$ELLIPSIS/") // trim leading "…/", which is confusing
}

class MirrordDropDown : TogglePopupAction(), DumbAware {
Expand Down

0 comments on commit cf04ae5

Please sign in to comment.