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
@gkatev pushed 15 commits.
af688e251b40ff86b8ce696983b6b7d37a37d097 projectorganizer: Use GtkFileChooserNative when configured in Geany 5428f54910c532770eedd5ea379c180ab812ba1e codenav/goto_file: Keep dialog open after denying creation of not-found file 1b5ed465cc1b3d9613db16ec89d7cac7c5cb971d codenav/goto_file: Fix absolute paths 8946158c79a3d043e68ca7fa0e1ba9e480e6150c codenav/goto_file: Now works with no document open 6cffc553763a3135c79b25d85dc2ff8cff3e2bfe codenav/goto_file: Fix whitespace inconsistencies (mainly indentation) 8ca51c59d1f52b380241547f33d0950b6cefde64 codenav/goto_file: Completion enhancements (inspired by GtkFileChooser) 8f6b62e5d067574f1d40d8193889e795b821b7b0 codenav/goto_file: The Tab key now also triggers inline completion 75ae6a2206ca439dc497191f17148144f1a97c3e codenav/goto_file: Fix ref counting of entry completion object 9b977746037073f07853b24d330afa469e96041b codenav/goto_file: Simplify reference model handling ddc4f50925d1bd9f87f459dc7fc4c16d698e92dc codenav/goto_file: Rework directory_check; simpler, better, safer 5d01fb5e23f37224015e1af6a440cbc9dc64a4b9 codenav/goto_file: Show error message if the entered path is a directory d8db04b177fa2314eb55dc0087b215a0d39689ab codenav/goto_file: Add support for '~' in paths (= home dir) 48eab043625981ae93946325853907de994a1188 codenav/goto_file: Fix entry_key_event not getting called first cb97d8c8d508ce04c83512dd8f86bed6703f59ee codenav/goto_file: Always return FALSE from entry_inline_completion_event 6d6b2e843fddddca7277b7ecd20e3b31b517c56f codenav/goto_file: Tab keys shows the autocomplete list if not visible
@gkatev pushed 14 commits.
3165d177ff3c036edad788ccf23acbc26dc9d94e codenav/goto_file: Keep dialog open after denying creation of not-found file c5c0c95d4f0de57cc58848b88fa293c0beb8a3b7 codenav/goto_file: Fix absolute paths 0e65b4b86644085ba8e87095177a2523e0e85297 codenav/goto_file: Now works with no document open 6f7ce66354604a21f7e236a576caba9765485788 codenav/goto_file: Fix whitespace inconsistencies (mainly indentation) 7d71089a60932361e34d0e9a51723a5d89210df2 codenav/goto_file: Completion enhancements (inspired by GtkFileChooser) 544a5cbca590b9b717c0203c93373324346cce31 codenav/goto_file: The Tab key now also triggers inline completion 6566bc500c6109305f3f292188da2ddbbf45e162 codenav/goto_file: Fix ref counting of entry completion object cfe8b936165e155b4b19cde06227d6db08c60549 codenav/goto_file: Simplify reference model handling 29630f1c5fc89198eec278c6d2b71b6246d4ace4 codenav/goto_file: Rework directory_check; simpler, better, safer f1b8b9eef47fb6e979f585123e01115cc93664ca codenav/goto_file: Show error message if the entered path is a directory dc62bfe98bf99b24187983718a7bd03871c9bb83 codenav/goto_file: Add support for '~' in paths (= home dir) b79fda1ca154a6d219ad6a34881d8ebd39bfe458 codenav/goto_file: Fix entry_key_event not getting called first 653c9ad65aaf73e78c05cc999f951a2db9c6a3f3 codenav/goto_file: Always return FALSE from entry_inline_completion_event 09e500415eeb580b42efde5efe0d64cadf653928 codenav/goto_file: Tab keys shows the autocomplete list if not visible
github-comments@lists.geany.org