tui: autocomplete: expand directory on Tab, select on Enter #6975
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, both Tab and Enter keys would immediately select the currently highlighted autocomplete option. There was no direct way to navigate into subdirectories unless the user already knew the exact filename within that directory.
Change the Tab key behavior to expand directories instead of selecting them. When the user presses Tab on a directory entry (identified by trailing slash), the input is updated to show the directory path, allowing further navigation into subdirectories. Enter key retains the original behavior of immediate selection.
This provides a more intuitive file navigation experience similar to shell tab completion, where Tab expands paths progressively and Enter confirms the final selection.