Skip to content

Fix: Select the folder you came from when navigating up on Linux - #184

Merged
MemerGamer merged 1 commit into
MemerGamer:mainfrom
lextudio:fix/scroll-to-previous-folder
Oct 13, 2026
Merged

MemerGamer merged 1 commit into
MemerGamer:mainfrom
lextudio:fix/scroll-to-previous-folder

Conversation

@lextm

@lextm lextm commented Oct 13, 2026

Copy link
Copy Markdown

What

Fixes the "scroll to the previous folder when navigating up" behaviour: after entering a folder and going back up, the folder you came from is not selected/centred.

Why

BaseShellPage computed the path of the folder to select with a hard-coded backslash separator:

var separator = isFtp ? "/" : "\\";

On Linux (and macOS) paths use /, so folderToSelect was built with \ and never matched any item in FilesAndFolders, leaving nothing selected. Use the platform directory separator instead:

var separator = isFtp ? "/" : System.IO.Path.DirectorySeparatorChar.ToString();

This keeps the Windows behaviour (backslash) and fixes Linux, where the setting (ScrollToPreviousFolderWhenNavigatingUp, default on) had no effect.

Notes

  • One-line change, no behaviour change on Windows.
  • Verified on macOS that the item is now selected and scrolled into view.

The "scroll to the previous folder" logic used a hard-coded backslash separator, so on
macOS the computed folder path never matched and going back left nothing selected. Use the
platform directory separator instead.

@MemerGamer MemerGamer left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lextm, nice catch! The hard-coded backslash meant the folder you came from was never matched on Linux. I traced the Linux cases (going up one level, and up to /) and they now select the right folder. CI passes. Merging.

@MemerGamer
MemerGamer merged commit e58466b into MemerGamer:main Oct 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants