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 228225 - Select next element misses some selections, when they start at the same offset
Summary: Select next element misses some selections, when they start at the same offset
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords: PATCH_AVAILABLE
Depends on:
Blocks:
 
Reported: 2013-04-03 22:54 UTC by markiewb
Modified: 2013-08-12 21:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed patch (1.09 KB, patch)
2013-04-03 22:54 UTC, markiewb
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2013-04-03 22:54:33 UTC
Created attachment 133288 [details]
Proposed patch

f.e. new StringBuilder().ap|pend("foo").append("bar");

ACTUAL
//new StringBuilder().append
//new StringBuilder().append("foo").append("bar");

Some selections are missing

EXPECTED
//new StringBuilder().append
//new StringBuilder().append("foo")
//new StringBuilder().append("foo").append                                
//new StringBuilder().append("foo").append("bar")
//new StringBuilder().append("foo").append("bar");


I am sorry, this regression was introduced by my patch in https://netbeans.org/bugzilla/show_bug.cgi?id=215552. So I like to propose the attached patch to fix the behaviour.

@Dusan: Are there existing testcases or test API, so that I could provide unit tests to prevent future regressions regarding the selection behaviour?
Comment 1 Dusan Balek 2013-04-04 08:44:54 UTC
Fixed in jet-main. Thanks for the patch!

http://hg.netbeans.org/jet-main/rev/4fa6012542b7

Unfortunately, there are no unit tests for this feature yet :-(
Comment 2 markiewb 2013-08-12 21:14:15 UTC
verified in 201308092300