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