This fixes following the current document path. As mentioned in #737 this was broken on Windows but actually it was broken on non-Windows as well if the start directory (Geany's default open directory or the project base directory) has no common parts with the current document's file path.
For Windows, there was an additional hack necessary: ignoring the drive letter completely in all checks. This made it working for the moment but obviously breaks a lot of the plugin's functionality if files on another drive than the current are handled. This should be fixed properly but since the fact that I don't use the plugin and my available time is limited, I won't do myself. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany-plugins/pull/796
-- Commit Summary --
* TreeBrowser: Fix wording * TreeBrowser: Fix memory leaks * TreeBrowser: Always search the whole path when trying to find current file in tree * TreeBrowser: Unify plugin signal connect methods * TreeBrowser: Strip drive letter on Windows
-- File Changes --
M treebrowser/src/treebrowser.c (98)
-- Patch Links --
https://github.com/geany/geany-plugins/pull/796.patch https://github.com/geany/geany-plugins/pull/796.diff
Ignore https://github.com/geany/geany-plugins/pull/796/commits/428b6d5a87d262701f85..., I will replace this commit with a better solution as stripping the drive letter breaks more than it solves.
@eht16 I assume you like to rebase this before merging?
Sure but right now I don't want this merged at all (see my comment above as well as the WIP label). This needs more work.
Closed #796.
@eht16 OK. Reopen PR once done.
github-comments@lists.geany.org