Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 376328

Summary: [Compare]Do not respond to select a diff when selecting a range in the editor.
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: ClientAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Silenio_Quarti
Version: 0.4   
Target Milestone: 0.5 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description libing wang CLA 2012-04-09 11:54:24 EDT
Compare widget is listening to "Selection" event in each editor to capture the current caret position in order to change the "current diff". But it was meant to capture it when user only clicks on anywhere in the editor.
When user is selecting a range we should not respond to change the current diff.
 
Silenio, not sure if there are any better events/API while editor was evolving.
Listening "Selection" event will not work well in this case:

If you have diff block containing several diff words, click at the empty space after the diff words will always highlight the diff words. But user's intention might have been the diff block.
Is there any way to know if a user clicks on a line but not hitting any characters?
Comment 1 libing wang CLA 2012-04-09 12:03:24 EDT
fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=088328499658a87514645882895937676ce9b700.

I am still using Selection event to check the current caret position but if there are better editor APIs I will follow up.