Bug 540131 - Compare: Open compare editor at current cursor position
Summary: Compare: Open compare editor at current cursor position
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 4.8   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Compare-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-15 06:59 EDT by Juergen Baier CLA
Modified: 2021-03-05 09:40 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Baier CLA 2018-10-15 06:59:53 EDT
1. Open a Java file
2. Click on "Compare With ..." and choose the target (e.g. other branch).

=> Compare view is shown. The cursor position in the compare view is the one with the first difference.

Problem: The compare view should open at the same cursor position from which the comparison was started.

In particular with long Java files this is painful: You are only interested in the code at line 2987, but you have to scroll down the compare view to get to that position.

I think the current cursor position is a better default for the compare view than the first difference.
Comment 1 Juergen Baier CLA 2021-03-05 09:04:24 EST
I set this bug from "enhancement" to "normal". I think this is actually a bug. 

In the past few days I had to adapt a large unit test file to a new API:

- I'm on some code line (say: line 2693)
- I choose "Compare With -> HEAD revision" 

=> The compare editor is opened at line 1.

I now need to

- go back to the source file
- remember the line number
- go back to the compare editor 
- jump to that line number in the compare editor

Not very convenient ...