This happens only once per session: the first time one right clicks other than the top item in the sidebar documents list, the top one is selected instead of the one under the cursor, as expected. Reproduction:
- a _new_ Geany session (close and open Geany again);
- more than one files open;
- open the sidebar at the "Documents" tab;
- right click an item, other than the top file/dir, in order to close it;
- the top item is currently selected, if one chooses "Close" from the popup menu, the top file will be affected.
Geany version: 0.20 (though this bug existed in previous versions).