Closed elextr closed 9 months ago
Geany 2.0 does
Does it? It doesn't seem so.
That said, yes, I should use the position of the click and not the position of the caret.
Actually both do, right click on something it can't "goto symbol definition" on, like while
and the caret moves there. Probably be good if the caret move happened first, since the LSP needs the location.
Ah, alright, you mean "after clicking goto" and not "right click alone" because the latter doesn't move anything.
Hmmmm, none of the right click menu actions seem to care about the click position, they all seem to only care about caret, thats really nasty, right click and move lines up, and the line with the caret moves, not the line clicked on.
Think thats a Geany one, will raise there.
Ah, alright, you mean "after clicking goto" and not "right click alone" because the latter doesn't move anything.
Yes, Geany 2.0 uses the correct symbol (the one clicked on) but geany-lsp doesn't.
OK, now thinking about it, it would really have to be Geany to move the caret when right-clicking - when the menu entry is clicked, it has no way of learning where the click event happened and there's nothing it could do.
But it's actually a bit questionable whether Geany should do that - the current state meets my expectations that the menu is relative to the caret position and not the click event position.
Anyway, closing here, not the plugin problem.
Yes, Geany 2.0 uses the correct symbol (the one clicked on) but geany-lsp doesn't.
Ah, really, reopening then. I have to check what Geany does exactly.
Ahhh, its only the LSP items at the top of the right click menu, the item that existed in 2.0 "goto symbol definition" still uses the clicked position in -lsp.
(If I havn't confused myself, I have 1.38, 2.0 and -lsp all open at the same time on the same files ;-)
It should be fixed now. I had to modify the Geany LSP interface to provide the position for goto definition/declaration. For other features invoked from the context menu I used the "update-editor-menu" signal to get the position.
Seems fixed.
Geany 2.0 does, Scite does, Vscode does.
As a result the right click menu applies to the wrong thing.