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

(Quick) Search in editor unfolds collpased regions with matches immediatly while typing #910

Closed
ronso0 opened this issue Oct 8, 2024 · 4 comments

Comments

@ronso0
Copy link

ronso0 commented Oct 8, 2024

When typing in the new floating Search widget, previously ccollapsed region (methods) with matches are unfolded immediatley.
If there is, I did not find the options in Window -> Preferences to change that behavior. Ie. restore the behavior of the previous Search implementation (oldschool moveable dialog, my previous version was 2024-03).

To Reproduce

  • open a cpp file in the editor
  • collapse all regions (methods, comments etc.)
  • bring up the Search widget with Ctrl+F
  • type a string

Expected behavior
Edit position, scroll position and collapsed state remains untouched until I hit Enter to search

Actual behaviour
As soon as I type (or rather after the debounce timeout), the editor jumps to the next match, i.e. unfolds regions that I intended to skip (type, move cursor in editor, hit Enter to search downwards).

Version Information (please complete the following information):
Unbuntu Studio 20.04.5
Eclipse 2024-09 (4.33.0)
CDT 11.6.1.202406241230

@jonahgraham
Copy link
Member

Have a look at https://eclipse.dev/eclipse/news/4.33/platform.php#find-replace-overlay there is a screenshot that shows where the preference is to change back to the old find dialog.

@ronso0
Copy link
Author

ronso0 commented Oct 8, 2024

Okay, thanks for the hint!

But, about the actual 'bug': is auto-search really a desired feature?
It's different to all search/replace dialogs I encountered where I have to press Enter to search.
The docu you linked says

By default, it performs a "search as you type" ...

Can this be disabled with some config flag?


FWIW while I'm at it I'd like to share my impression with the new Search overlay.
(I'm aware this probably not the best place, but anyway..)

Pros

  • it's compact
  • pre-defined positions (top / bottom) are okay (well, I can't move it anyway 😆 )

Cons

  • Tab key navigation/usage
    • going from Find to Replace field takes 10! keypresses
    • using Ctrl+F / Ctrl+R to jump between the two would be cool, but doesn't work:
      Ctrl+F in Replace field closes the dialog
      Ctrl+R in Find field while Replace bar is visible closes Replace bar
    • Enter is context dependent (Find next / Replace current match), say I want to replace only a few matches the keyboard UX is sub optimal
  • option icons are hard to recognize with the dark theme, same for the keyboard focus frame
    image

@jonahgraham
Copy link
Member

I agree with you on many of these cons, some of them are in progress. @ronso0 Can you raise this issue in https://github.com/eclipse-platform/eclipse.platform.ui/issues or https://github.com/eclipse-platform/eclipse.platform.ui/discussions please? The Eclipse CDT project does not maintain nor implement this new feature of the Eclipse Platform, we simply inherit this behaviour that is shared by all editors.

You may want to start with a look at eclipse-platform/eclipse.platform.ui#2021 which is the umbrella issue for the new find overlay.

I'm going to close this CDT copy of the issue. If there are specific CDT customizations to search we can create new issues.

@ronso0
Copy link
Author

ronso0 commented Oct 9, 2024

Thanks for the pointer @jonahgraham, seems the issues I found are covered by eclipse-platform/eclipse.platform.ui#2284 and eclipse-platform/eclipse.platform.ui#2161, will comment there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants