Sometimes right-click to open a the popup menu in the document sidebar wouldn't change the selection before showing the popup. Then the popup wasn't related to the document that was clicked.
This was especially bad with middle-click to close. It closed anything but the clicked document (or folder in case of tree view).
This was caused by some unexpected calls to the "activate" signal handler for the "openfiles_path_mode" menu items. The handler might re-create the document list which in turn invalidates the current selection.
Now the signal handler has some protection against unexpected calls and the selection properly updates upon right-click before spawing the popup. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3265
-- Commit Summary --
* Fix intermittent, erratic right-click behavior
-- File Changes --
M src/sidebar.c (17)
-- Patch Links --
https://github.com/geany/geany/pull/3265.patch https://github.com/geany/geany/pull/3265.diff
I was not able to reproduce the problem that the selection was not changed before the popup.
Anyway, the changes look sane. Great!
Merged #3265 into master.
Thanks for merging. Just as a note, for small changes like this I prefer to avoid the extra merge commit via squash merge strategy.
I still need to find a way to look into your head to know when you want me to merge, squash or rebase...:)
@kugel- I also don't understand what you mean by "extra merge"? There is only one merge AFAICT?
squash doesn't create a merge commit
@eht16 Generally speaking (and IMO): I generally try to avoid to merge commits because they make the history hard to follow and complicate bisecting. So I'm trying to restrict true merges to specific scenarios.
If the PR consists of multiple commits that are individually valuable, then a normal merge is warranted. On the other hand, if a PR has one main and some fixups on-top (or only a single commit to begin with), then I consider squash merge to avoid merge commits.
I.e. a merge when I truly want to combine two histories (Geany master + the PR) and squash commit when I just applying relatively simple/small patches.
I.e. a merge when I truly want to combine two histories (Geany master + the PR) and squash commit when I just applying relatively simple/small patches.
Basically agree, but just pointing out ahead of time its always going to be a judgement call when to do squash
github-comments@lists.geany.org