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 242242 - Undo,Redo and a smart Enter Test
Summary: Undo,Redo and a smart Enter Test
Status: REOPENED
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-23 09:11 UTC by nigel
Modified: 2016-07-23 18:37 UTC (History)
1 user (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 nigel 2014-02-23 09:11:10 UTC
Type String str = "abcde 123456"; inside a method's body.  Place cursor after "e".  Hit Return and everything works as it should.  Cursor is positioned on second line just inside the "" marks.  Now press Undo and then Redo.  Everything works but the cursor does not return to the same position.  I assume this is not intended.
Comment 1 stwr 2015-07-28 13:46:18 UTC
Product Version: NetBeans IDE 8.1 Beta (Build 201507231027)
Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\cendrowiczm\AppData\Roaming\NetBeans\8.1beta
Cache directory: C:\Users\cendrowiczm\AppData\Local\NetBeans\Cache\8.1beta

Cursor is not located between quotes after Redo.
Comment 2 manikantannaren 2015-08-21 05:03:13 UTC
Reproducible in build 201508200002

Steps to reproduce
1. Type String str = "abcde 123456"; inside a method's body.  
2. Place cursor after "e".  
3. Hit Return 
4. The string is split into two lines and Cursor is positioned on second line just inside the "" marks. 
5. Undo (ctrl+z CMD+z) 
6. Redo (Ctrl+y, CMD+y)

Expected result
1. On UNdo, the code is restored to original state
2. Cursor is after e.
3. On redo the line is split after "e"
4. Cursor is placed after the " in the next line

Actual Result
1. On UNdo, the code is restored to original state
2. Cursor is after e.
3. On redo the line is split after "e"
4. Cursor is placed before the + in the next line
Comment 3 stwr 2015-08-26 08:53:43 UTC
Issue is still reproducible.

Product Version: NetBeans IDE Dev (Build 201508260002)
Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 4 Martin Balin 2016-07-07 07:28:46 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 5 mhmdchebbi 2016-07-23 18:37:00 UTC
the issue is reprodictible on dev-201607230002