Skip to content

"Use Selection for Find" doesn't fill Find field on first use #1002

@per1234

Description

@per1234

Describe the problem

The IDE's Edit menu contains a Use Selection for Find item.

🐛 The first time this is used after opening an IDE window, the "Find" field is not filled with the selected text.

To reproduce

  1. Select File > New from the Arduino IDE menus.
  2. Select some text.
  3. Select Edit > Use Selection for Find from the Arduino IDE menus.
    🐛 The text is not pre-filled in the "Find" field.
  4. In the "Find" UI, click the X icon.
  5. Select some other text.
  6. Select Edit > Use Selection for Find from the Arduino IDE menus.
    🙂 The text is pre-filled in the "Find" field.

Expected behavior

"Find" field is always filled with the selected text after selecting Edit > Use Selection for Find.

Arduino IDE version

Original report

2.0.0-rc6-snapshot-b407d0a

Last verified with

9a6a457

Operating system

Windows, Ubuntu

Operating system version

  • Windows 10
  • Ubuntu 20.04

Additional context

I recommend evaluating whether "Use Selection for Find" has any value. If not, it would be better to just remove it rather than spending time on getting it working correctly. Its functionality appears to be identical to Edit > Find Next, except that Find Next works correctly.

I don't see such a thing in the related applications (e.g., Arduino IDE 1.x, Theia Blueprint, VS Code). The small number of search results I get indicate maybe it is used in some macOS applications?

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

Labels

topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions