-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix FileSystem dock navigation when using Split Mode #100336
Conversation
Show in FileSystem does not work properly in split mode. You need to use it twice to show the file. |
d9d52ed
to
22dca1a
Compare
Fixed. Also, I've noticed that every time This would be simple enough to fix in the case when it's already empty and doesn't need to be cleared, but in the other case it's a little more involved. Since this is also kind of a separate issue, it's probably better handled in a separate PR. |
Sounds like #100275 will fix it. |
Another bug is that it changes behavior when navigating to folder depending on |
22dca1a
to
a79a4b5
Compare
It should work now regardless of the path ending with |
|
||
if (!found) { | ||
TreeItem **directory_ptr = folder_map.getptr(base_dir_path); | ||
if (!directory_ptr) { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should result in an error 🤔
} | ||
} else { | ||
(*directory_ptr)->select(0); | ||
_update_file_list(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be optimized to not update list when the base directory is the same, but that would probably require more changes so it's something potentially for later.
while (item) { | ||
if (item->get_metadata(0).operator String().ends_with(file_name)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is redundant when selecting directory, because it should always match anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works correctly now.
Thanks! KoBeWi comments were all non-blockers, so they can be handled in a separate PR |
Fixes #100277
The regression was introduced by #100010 (most likely), which made bigger changes to
_navigate_to_path()
.This also simplifies the logic a bit, and does less trimming and appending of
/
all the time.