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

[Find/Replace] 'Find Next' (Ctrl+K) command broken with the overlay #2285

Open
Tracked by #2021
sratz opened this issue Sep 17, 2024 · 2 comments
Open
Tracked by #2021

[Find/Replace] 'Find Next' (Ctrl+K) command broken with the overlay #2285

sratz opened this issue Sep 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@sratz
Copy link
Member

sratz commented Sep 17, 2024

When the find/replace overlay is enabled, the 'Find Next (Ctrl+K)' (org.eclipse.ui.edit.findNext) command has no effect.

When the find/replace overlay is disabled, it works again.

When then re-enabling the overlay, Ctrl+K still works on the 'old' search pattern that was entered in the legacy dialog.

The findNext action org.eclipse.ui.texteditor.FindNextAction works on org.eclipse.ui.texteditor.FindNextAction.getDialogSettings() which uses

IDialogSettings settings = PlatformUI.getDialogSettingsProvider(FrameworkUtil.getBundle(FindNextAction.class)).getDialogSettings();

Apparently this dialog setting is not written anymore when using the new overlay.

I guess the overlay should also write to those dialog settings to keep the search histories in sync.

@sratz sratz added the bug Something isn't working label Sep 17, 2024
@jmccabe
Copy link

jmccabe commented Sep 18, 2024

I was hoping to be the first to report this but, sadly, no, you got in before me 😢

Unless there's another key combination that can do the job, I'm going to have to revert to not using the overlay, even though it looks nice.

@HeikoKlare
Copy link
Contributor

Thank you for reporting this. I agree on the expectation that those actions should behave according to the last search operation (no matter whether it was in the dialog or overlay).

Still, this might be a bit tricker to resolve (properly). Having a static value for the search pattern worked with the existing dialog, as there was only one for the whole workbench. Now that there is one overlay per editor, we need to ensure that the context is properly considered. Maybe it is easy to fix the behavior but I am not sure whether it may also require design change to not have it work "by accident" (as the last search operation always implicitly belongs to the editor/view of interest).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants