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 269430 - Pressing Home/End in Java file sometimes moves cursor to beginning/end of entire file instead of beginning/end of line
Summary: Pressing Home/End in Java file sometimes moves cursor to beginning/end of ent...
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-26 12:15 UTC by ebakke
Modified: 2017-01-03 11:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screen recording showing the bug happening during a Java editing session (3.72 MB, video/quicktime)
2016-12-26 12:15 UTC, ebakke
Details
Screencast showing how to reproduce the bug (4.12 MB, video/quicktime)
2017-01-03 11:03 UTC, ebakke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ebakke 2016-12-26 12:15:19 UTC
Created attachment 163298 [details]
Screen recording showing the bug happening during a Java editing session

Since switching from 8.1 to 8.2, I keep seeing an intermittent bug where every now and then during editing a Java file, pressing the "Home" or "End" key to go to the beginning or end of the line, respectively, instead causes the cursor to jump to the beginning or end of the entire file. This is very annoying.

See the attached screen recording, where after pressing the "End" key at 00:29, the cursor goes all the way to the end of the file. In the case of the video, the shift key was held down as I intended to select the rest of the line, but I have also observed this bug when the Home or End keys are pressed without any modifiers.

I have not been able to reliably reproduce this bug; it just shows up a couple of times a day during normal editing. I suspect the bug only occurs in certain conditions where NetBeans' Java parsing system is trying to update itself after the Java file has changed due to edits. So it might be a race condition that only happens when certain edits are being done at a certain speed (though I'm not sure).
Comment 1 ebakke 2016-12-26 13:59:04 UTC
During the last two hours of coding, the bug occurred 4 times. I've had the IDE log open, and while I see several logging entries related to Java indexing/parsing, I can now confirm that no new log entries were printed between two subsequent occurrences of the bug. So there might not be any useful information in the log.
Comment 2 ebakke 2017-01-03 11:03:26 UTC
Created attachment 163328 [details]
Screencast showing how to reproduce the bug

I finally figured out how to reproduce this bug. It has nothing to do with the Java parsing infrastructure; rather, the bug occurs when the mouse cursor happens to hover over a syntax error such that a small tooltip is shown describing the error. If Home/End is pressed while the tooltip is open, the cursor jumps all the way to the beginning or end of the file rather than to the beginning or the end of the line like it ought to. See the attached screen recording.