Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit > Find issues #5380

Closed
per1234 opened this issue Sep 17, 2016 · 7 comments · Fixed by #5383
Closed

Edit > Find issues #5380

per1234 opened this issue Sep 17, 2016 · 7 comments · Fixed by #5383
Assignees
Labels
editor-refactor Related to the refactoring of the Arduino IDE's editor component

Comments

@per1234
Copy link
Collaborator

per1234 commented Sep 17, 2016

Using Arduino IDE 1.6.12 Hourly Build 2016/09/14 08:20 with Windows 7 64 bit

  • Create a sketch with 3 or more tabs.
  • Add the text findtext(or any text you like) to each tab.
  • Save the sketch.
  • Close the sketch.
  • Open the sketch.
  • Edit > Find > Find: > findtext
  • Check the Search all sketch tabs box

Issue 1:

  • Click Find button repeatedly -The found text on all but the first tab is not highlighted. If you click on the IDE window(not on the editor area as this will cause it to be deselected) the highlight will appear. Once that has been done, the highlight will appear on that tab on subsequent finds. This is the reason the sketch had to be closed and reopened, because the process of creating the tabs/adding the findtext to each tab causes the highlighting to work correctly.

Issue 2:

  • Find goes through the tabs right to left instead of the previous left to right behavior.

Issue 3:

  • Replace with: > replaced
  • Click Replace all
  • The findtext in the second tab was not replaced.

These issues don't occur with Arduino IDE 1.6.11 or previous

Please don't release Arduino IDE 1.6.12 before this issue is fixed. It's very important for Replace All to work reliably.

@matthijskooijman
Copy link
Collaborator

This is probably caused by #4363. I'll see if I can find some time to look into this.

@matthijskooijman matthijskooijman self-assigned this Sep 18, 2016
facchinm added a commit to facchinm/Arduino that referenced this issue Sep 19, 2016
@facchinm
Copy link
Member

Should be fixed by #5383
#per1234, could you check as soon as @ArduinoBot prepares the builds?

matthijskooijman added a commit to facchinm/Arduino that referenced this issue Sep 19, 2016
When searching through all tabs, the order was accidentally reversed.
This was broken by commit d2bac86 (Remove tab switching logic from
Sketch).

This also fixes a problem where "replace all" would only work on the
first and last tab (since it would search backwards from the first tab
to the last tab and then conclude it was done).

This fixes a part of arduino#5380.
@matthijskooijman
Copy link
Collaborator

I just came to the same conclusion. However, it seems this only fixes issue 1 and 3, I still see 2 happening. What seems to happen there is that when a tab is first created, it does not have a caret yet (or something like that) and selections do not show up. Once you click in the text area, selections will show up from then on. I'll see if I can figure out what happens exactly.

@facchinm
Copy link
Member

facchinm commented Sep 19, 2016

Issue 2 looks solved to me too (have I missed something about the real problem? )

@matthijskooijman
Copy link
Collaborator

matthijskooijman commented Sep 19, 2016

@facchinm Could you reproduce the problem without the fix? Note that the issue only occurs in tabs that have never received the focus, so really only directly after loading a sketch.

@facchinm
Copy link
Member

Ah ok, we are talking about issue 1 (find does not highlight content on secondary tabs).
Indeed, it's still here after the patch...

@matthijskooijman
Copy link
Collaborator

Oh, woops, I meant issue 2/3 is fixed, 1 is still present. Sorry for that.

It seems the issue is related to focus somehow, I think that only after the textarea has been focused at least once, it draws its selection or something like that. The problem is probably that the selection is set while the editor window is not focused. Not sure how it works exactly yet, though.

@facchinm facchinm added the editor-refactor Related to the refactoring of the Arduino IDE's editor component label Sep 20, 2016
cmaglie added a commit to facchinm/Arduino that referenced this issue Sep 20, 2016
cmaglie added a commit to facchinm/Arduino that referenced this issue Sep 20, 2016
@cmaglie cmaglie added this to the Release 1.6.12 milestone Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-refactor Related to the refactoring of the Arduino IDE's editor component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants