This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 183695 - NetBeans doesn't return selection on undo
Summary: NetBeans doesn't return selection on undo
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Actions/Menu/Toolbar (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal with 2 votes (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 159016 187495 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-04-08 09:43 UTC by Ivan Sidorkin
Modified: 2016-06-28 07:44 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Sidorkin 2010-04-08 09:43:35 UTC
select some code
delete it
do undo
NetBeans doesn't return selection on undo
Comment 1 Miloslav Metelka 2010-04-08 13:15:05 UTC
I know it's off-topic from user's point of view but with Swing's MVC this is not straightforward to implement this request since UndoManager is per-Document which is correct but caret position/selection is a view-related info. If there would be more views per one document each of them can have a different selection.
A solution would be to have an Undo/Redo API that would allow to associate caret-related information (with a weak-ref to the text component) to the undoable item of the modification.
Comment 2 Vitezslav Stejskal 2010-04-19 20:39:15 UTC
*** Bug 159016 has been marked as a duplicate of this bug. ***
Comment 3 Vitezslav Stejskal 2010-06-14 06:41:48 UTC
*** Bug 187495 has been marked as a duplicate of this bug. ***
Comment 4 dalton1130 2016-06-24 15:19:42 UTC
Is there any chance that this enhancement ever happens? I would love for it to be a thing
Comment 5 Ralph Ruijs 2016-06-24 20:54:20 UTC
Mila, are we able to implement this now that we have EditorCaretUndo?
Comment 6 Miloslav Metelka 2016-06-27 08:31:44 UTC
I've tested it in a recent dev build and selection restoration works both after deletion by backspace and delete keys.
Comment 7 dalton1130 2016-06-27 13:53:29 UTC
That's awesome. Any time table on when this could be released?
Comment 8 Ralph Ruijs 2016-06-28 07:44:37 UTC
(In reply to dalton1130 from comment #7)
> That's awesome. Any time table on when this could be released?

The nightly build is available from the download page[1]. The NetBeans 8.2 wiki[2] shows the latest info on the release.


[1] - http://bits.netbeans.org/download/trunk/nightly/latest/
[2] - http://wiki.netbeans.org/NetBeans_82