Skip to content

Avoid changing file picker selection when typing#330

Merged
lhecker merged 1 commit intomainfrom
users/lhecker/329-filepicker-completion
May 27, 2025
Merged

Avoid changing file picker selection when typing#330
lhecker merged 1 commit intomainfrom
users/lhecker/329-filepicker-completion

Conversation

@lhecker
Copy link
Member

@lhecker lhecker commented May 27, 2025

Closes #329

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

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

I liked how it updated the picker but it makes sense that it shouldn't in this case

@lhecker lhecker merged commit e5fcb0b into main May 27, 2025
1 check passed
@lhecker lhecker deleted the users/lhecker/329-filepicker-completion branch May 27, 2025 22:58
@lhecker
Copy link
Member Author

lhecker commented May 27, 2025

I think we ideally need a more robust/elegant filepicker overall. Not sure how that would look though.

@ivanovkirilg
Copy link
Contributor

OK, I don't understand this change, to be honest; but now I see this has introduced a regression (#347), I will ask my question.

@lhecker, in the issue #329 I pointed out the line that adds the /. As far as I could tell, that line does exactly and only this - appends a / to a matching directory path.
What is the reason to fix it like this, rather than just removing the line?

When I was writing the issue, I tried removing it - the rest of the file picker functionality (i.e. auto-selecting a matching file) seemed to be unaffected. I just didn't feel confident suggesting removing the functionality, in case you wanted to keep it for directories whose names don't conflict.

@lhecker
Copy link
Member Author

lhecker commented Jun 1, 2025

As far as I could tell, that line does exactly and only this - appends a / to a matching directory path.

That line doesn't append a /, rather it updates the "File name:" field with whatever you clicked on.

What is the reason to fix it like this, rather than just removing the line?

The Windows file picker has exactly this behavior: When you click (or otherwise focus) a file in the file list, it'll update the "File name" field accordingly. So, the bug you found doesn't occur due to that line, but rather due to incorrect state tracking inside the list view UI component.

Lou32Verbose pushed a commit to Lou32Verbose/edit that referenced this pull request Jan 11, 2026
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.

File picker: directory completion messes with opening a file

3 participants