eclipse-platform / eclipse.platform

https://eclipse.dev/eclipse/
Eclipse Public License 2.0
84 stars 113 forks source link

Navigate > Previous Edit Location thwarted by cloned editor #1526

Closed Sciuriware closed 2 months ago

Sciuriware commented 3 months ago

I just recently found this issue, so I can not tell how old it really is. From the moment you clone an editor to work on two positions in the same file, ^Q takes you to the head of the method or block were you already are. Obviously the other, inactive, editor on the same file confuses the positioning algorithm.

OS = MacOS 11.7.10 (BigSur); Maybe this is a MacOS (INTEL) problem as the definition of CTRL is slightly different from MSWindos. Eclipse version 4.32

jukzi commented 2 months ago

this ticket refers to: image image

please give concrete steps how to reproduce - what happens and what is expected.

merks commented 2 months ago

I assume he means using Window -> Editor -> Clone you can make a second editor editing exactly the same file.

From what I understand of the history mechanism it only keeps track of the editor input and more recently the editor ID to track each editor's locations. So two editors with the same editor input and the same ID will not be seen as two editors by the history mechanism.

So open any editor, clone it, and then click back and forth between the two. You'll see there is only ever one history item for the editor:

image

Sciuriware commented 2 months ago

@merks You are right, that is what I meant. One might expect that, at least in one of those editors, the recent edit spot was retained. At the moment I can not reproduce the error in the latest stable build. Maybe coincidence, maybe my fault. Anyway, I can live with your explanation. Thanks for your time. ;JOOP!

Sciuriware commented 2 months ago

@jukzi Sorry for being not clear. ;JOOP!