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

Bug 487343

Summary: Lose a cursor position after applying 'Rename element' action
Product: [ECD] Orion Reporter: Valeriy Svydenko <vsvydenk>
Component: EditorAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: steve_northover, vsvydenk
Version: 10.0   
Target Milestone: 12.0   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Valeriy Svydenko CLA 2016-02-05 08:52:35 EST
Steps to reproduce:
1. Write simple js conten:
function foo() {         
   var y = 20;           
   function bar() {}     
   while (y == 10) {     
      function blah() {} 
      y++;               
   }
}
2. Try to rename 'y' variable. Into the line which has "y++" content
3. The cursor is moved to the line which has "var y = 20;" and the previous position was lost. 

It's OK if the file is small. But if a file is huge it's a problem to find previous position of the cursor.
Comment 1 Steve Northover CLA 2016-02-25 20:40:45 EST
I can see that this would be annoying.  Can't we leave the caret on the original element where the rename was requested?