Forum > Editor
Bug? Arrows for navigation wrong window
(1/1)
lainz:
Hi, seems that clicking on the arrows of the right window, moves the cursor from the left window!
I'm using fixes-fixes 2024-07-15
Martin_fr:
I use neither the toolbar, nor anchordocking....
I have seen key presses going to the wrong window under Anchordocking... (when I tested in the past).
But, there may be a different explanation. What command is assigned to the buttons? "Jump back" / "Jump forward" ?
Those 2 commands are not bound to a window. The IDE has *one* list of previously visited locations. That is locations from any file or unit => all in one list. (whenever the caret is moved by a command that records the location, then it is added to that one list)
The 2 arrows will navigate through that list. It does not (or maybe not) matter in which window you triggered the command)
If the navigation needs to go to a specific file (other than the current selected), then the IDE has a set of rules how to find an editor holding that file (in case it is open in more than one editor.).
Those rules can ("as option") include "what is the current focused window, containing a tab...". If (which is optional) they do then I don't know if they will already have any focus change that was triggered by pressing the button. I would expect that they do. But I then don't know how Anchordocking deals with that, since the active widow is always the window into which everything is docked.
The rules are on
Tools > Options
Editor > Pages and Windows
https://wiki.lazarus.freepascal.org/IDE_Window:__Editor_Options_MultiWindow#Find_jump_target_editor
Also mind that the navigation will bring up the recorded location. But it will not restore any active tab in any other window.
A common (unsolved) issue with 2 windows is, that
- Window 1 is active, you press "go to declaration"
- The target is in Window 2, and the active tab in Window 2 is changed
- going back will bring you back to Window 1 (and the correct tab in window 1).
But it does not undo the tab-switch in window 2.
Navigation
[0] Message Index