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.
Summary: | Click inside code / text editor having the "Find in document" area open (CTRL+f) takes cursor into the Find text field | ||
---|---|---|---|
Product: | editor | Reporter: | Pere |
Component: | Actions/Menu/Toolbar | Assignee: | Miloslav Metelka <mmetelka> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P1 | ||
Version: | Dev | ||
Hardware: | PC | ||
OS: | Windows 7 x64 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Pere
2017-02-02 16:51:41 UTC
*** Bug 262537 has been marked as a duplicate of this bug. *** Ok, concentrating on how to reproduce this I discovered this seems to involve having the screen split in several editors, and even anyone could argue (?) this is not really a bug but a feature? Steps to reproduce it: 1) Have your screen divided in half in two text editors, one with mainfile.java, at the left, and another one, secondaryfile.java, to the right. 2) Click on mainfile.java, press ctrl+f, do a search for a string which matches something. 3) Click on secondaryfile.java, anywhere in the code. Instead of placing the cursor there, the Find: text input ((which disappeared from mainfile.java when you switched editor) will appear there, and the string you searched for in mainfile.java will be highlighted, thus placing the cursor there. Another way of reproducing it: 1) Go to your project tree, right-click in the folder which holds secondaryfile.java and search for a string you know its there. Below in your screen the results from the searched text will appear. 2) Go to mainfile.java, click somewhere on the editor, open Find in file if it wasn't already open. Click inside the text input and place a text you know exists in the current editor. Current match(es) will appear highlighted in orange (or blue if in commented code areas). 3) Double click on a match in the Find... in project window below, where the find results were. Cursor will go to the secondaryfile.java editor, but instead of putting itself in the code area where the string was found, it goes to the Find input text, highlighting the last search you attempted on that editor. 3b (bonus)) Click on mainfile.java, anywhere inside the editor. Again, cursor will go inside the Find: input, not where you clicked on. Very annoying. Proposed solution / related behaviour: Netbeans should only keep/remember status of the "Find:" input text for open file for the editor tab belonging to the file where you actually opened it, and not moving/translating this state to the current tab you switch to. If I use ctrl+f in mainfile.java, I want it to be kept open there, not opening it in secondaryfile.java if I switch to that tab/file. And/or, of course, not going there if I click from a Find... in project search result; maybe it should go to the beginning of the line containing the occurence, or to the beginning or the end of the string, or wherever, but not inside the Find: input. It should be fixed by http://hg.netbeans.org/jet-main/rev/0e83cbf17195 It should work fine at least for Find Usages, Find-in-projects and Navigator clicks on Linux (hopefully there won't be any focus change specific subtleties on other platforms). Btw I've also entered issue #270242 for search text field content change. Integrated into 'main-silver', will be available in build *201703310002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/0e83cbf17195 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #269726 - Click inside code / text editor having the "Find in document" area open (CTRL+f) takes cursor into the Find text field. *** Bug 269890 has been marked as a duplicate of this bug. *** I'm still experiencing this a lot on Dev 201705310001, and also the "related" (or "duplicated", as you stated) bug at in the comment above, which I also reopened. |