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 242743 - Random reset display position on long lines.
Summary: Random reset display position on long lines.
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 8.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 240494 247079 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-10 13:36 UTC by viktor
Modified: 2015-09-25 14:09 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
File with issue (5.14 KB, text/xml)
2014-03-10 15:51 UTC, viktor
Details
Step 1 (8.99 KB, image/png)
2014-03-10 15:57 UTC, viktor
Details
Step 2 (9.49 KB, image/png)
2014-03-10 15:57 UTC, viktor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description viktor 2014-03-10 13:36:48 UTC
Random reset display position on long lines.
Comment 1 mmolda 2014-03-10 15:32:30 UTC
I don't know what you mean by this. Please provide some more info. Add exact steps how to reproduce, and you can also provide source file where it can be reproduced. Then simply reopen. Thanks.
Comment 2 viktor 2014-03-10 15:51:09 UTC
Created attachment 145906 [details]
File with issue

Try to edit largest comment or attribute
Comment 3 viktor 2014-03-10 15:57:02 UTC
Created attachment 145907 [details]
Step 1
Comment 4 viktor 2014-03-10 15:57:17 UTC
Created attachment 145908 [details]
Step 2
Comment 5 viktor 2014-03-10 16:05:51 UTC
Sorry for unclear bug report.

Steps to reproduce:

on  step-1.png  start position of cursor under "CCS"
then i made some changes in attribute (typed "some changes")
Next combination of key will be set display as step-2.png
"Down" -> "Up"
Comment 6 Tomas Mysik 2014-03-11 09:27:16 UTC
If I understand correctly, this issue is about XML support. Please evaluate, thanks.
Comment 7 viktor 2014-03-11 09:37:04 UTC
Yes, i can't reproduce it on other file types.
Comment 8 Svata Dedic 2015-05-14 10:11:19 UTC
Editor view hierarchy issue, IMHO. During my debugging, it happened that the call newCaretBounds = c.getUI().modelToView(
                                c, offset, Position.Bias.Forward);
in BaseCaret::updateCaretBounds() produced newCaretBounds.x == 0 although the offset clearly didn't correspond to any line start.

It seems that the culprit is DocumentViewChildren::modelToViewChecked method, the optimization from rev. b6041b6ecd29; I suspect that the documetview children are null because of some invalidation. Anyway, the returned rectagle has always x == 0, which seems inconsistent with the optimization turned off.

If not fixable, please suggest another way how to compute screen bounds allocated for the given document offset.
Comment 9 Miloslav Metelka 2015-08-18 11:34:07 UTC
Fixed in http://hg.netbeans.org/jet-main/rev/a62cc2a6e342
Comment 10 Quality Engineering 2015-08-20 01:27:49 UTC
Integrated into 'main-silver', will be available in build *201508200002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a62cc2a6e342
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #242743 - Random reset display position on long lines.
Comment 11 Miloslav Metelka 2015-08-20 10:26:44 UTC
*** Bug 247079 has been marked as a duplicate of this bug. ***
Comment 12 Svata Dedic 2015-09-25 14:09:18 UTC
*** Bug 240494 has been marked as a duplicate of this bug. ***