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.
Created attachment 138929 [details] Big property file to use for reproduction in zip. 1. Open up attached properties file. 2. Toggle Rectangular Selection on. 3. Put cursor on the right side next to the equal sign. 4. Press Ctrl+Shift+End and the rectangular selection is extended to the end of the rows and the cursor is at the end of the last row. 5. Release Ctrl and while pressing Shift, move cursor back to the left with the left arrow key. 6. The rectangular selection will snap to the cursor, but keep moving to the left and make the rectangular selection a vertical line. 7. Release Shift key and press the space bar. 8. A space is added, but the rectangular selection jumps to the far left and two subsequent presses of Space removes the first line in the file. Then subsequent presses of Space do nothing except hang Netbeans for a second or two. Expected: Rectangular selection does not jump to the far left and subsequent presses of the Space key ads more space to the column. This behaves correctly in a small file. Product Version: NetBeans IDE Dev (Build 201308192300) Updates: Updates available Java: 1.7.0_40-ea; Java HotSpot(TM) 64-Bit Server VM 24.0-b55 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-ea-b38 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Created attachment 138930 [details] Screenshot Screenshot shows rectangular selection's location after pressing Space. Also, see extraneous tail on rectangular selection that should not be there. If it is not there, scroll up and then back down and it should be there.
There is also a problem with Backspace when trying to expand/contract width of rectangular selection.The same sort of result happens after step #4 above--the rectangular selection jumps to the far left.
The problem can be narrowed to a much smaller file. For some reason the operation works OK if the selection block is < 80 lines tall. Once the selection expands from line #1 to line #80 (including), typing a character resets selection block to start of the line.
The reason for the behaviour is that after certain number of operations within the atomic lock, the view model will cease to update because of performance reasons. Code which recomputes the selection area and repaints the screen then fails to obtain correct on-screen coordinates, since it executes within the atomic lock. Fixed in http://hg.netbeans.org/jet-main/rev/02fdca0c279b
Did this make it into nightly builds? It still does not work and I got this IndexOutOfBounds exception today [1]. Possible related? [1] Issue 235727 Product Version: NetBeans IDE Dev (Build 201309070001) Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b55 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b40 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Hm, since there's no builder note in the issue, I think it was not propagated yet to main/golden (daily build). Closing till then - sorry. The fix is present on tag release74 branch (http://hg.netbeans.org/releases/annotate/cca47c335195/editor.lib/src/org/netbeans/editor/BaseKit.java), so it should eventually made it to the release. Just note - the fix only fixes character typing. As the function relies on on-screen coordinates (which may get out of sync during atomic lock), it could break elsewhere where an action actually replicates changes to many lines. From discussion held around rect selection, the mechanism is probably going to change to character-based selection, which can be more reliable.
Sorry, this still behaves exactly as described in comment 3 still. At line 79 when I type characters, all is fine. When extending rectangular selection to line 80 and typing characters, it jumps to the far left and gets messed up. Product Version: NetBeans IDE 7.4 RC2 (Build 201309252201) Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) And Product Version: NetBeans IDE Dev (Build 201310020002) Updates: Updates available Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
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