Hi, this *supercharges* codenav/goto_file with a wide range of changes, fixes, and new features.
I've included all the smaller commits, in case someone wants to take a closer look at each change, but I can squash them together before merging. This also supersedes #1329.
Features & changes: - The Tab key can now be used to: *(Inspired from shells, and GtkFileChooser)* - Show the completion list when it's hidden - Trigger an inline completion - Accept a suggested inline completion - Keep dialog open after user denies creation of not-found file (#1329) - Allow absolute paths, and recognize `~` as the user's home dir - If no document is open, the current dir is the user's home dir - Show error if the entered path is a directory - Bug fixes, improvements, code formatting fixes
Demo:
https://github.com/user-attachments/assets/d8458c58-7f3b-4fc8-bc7c-c123608b4...
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany-plugins/pull/1390
-- Commit Summary --
* codenav/goto_file: Keep dialog open after denying creation of not-found file * codenav/goto_file: Fix absolute paths * codenav/goto_file: Now works with no document open * codenav/goto_file: Fix whitespace inconsistencies (mainly indentation) * codenav/goto_file: Completion enhancements (inspired by GtkFileChooser) * codenav/goto_file: The Tab key now also triggers inline completion * codenav/goto_file: Fix ref counting of entry completion object * codenav/goto_file: Simplify reference model handling * codenav/goto_file: Rework directory_check; simpler, better, safer * codenav/goto_file: Show error message if the entered path is a directory * codenav/goto_file: Add support for '~' in paths (= home dir) * codenav/goto_file: Fix entry_key_event not getting called first * codenav/goto_file: Always return FALSE from entry_inline_completion_event * codenav/goto_file: Tab keys shows the autocomplete list if not visible
-- File Changes --
M codenav/src/goto_file.c (359)
-- Patch Links --
https://github.com/geany/geany-plugins/pull/1390.patch https://github.com/geany/geany-plugins/pull/1390.diff