eclipse.platform.ui icon indicating copy to clipboard operation
eclipse.platform.ui copied to clipboard

[Find/Replace]: Line selection is lost when turning it to a search-scope and back

Open Wittmaxi opened this issue 2 years ago • 3 comments

Let's make sure issue is not already fixed in latest builds first.

Steps to reproduce

  • Open Find/Replace in an editor
  • select some lines
  • Select "Scope:Selected Lines"
  • Select "Scope:All"
  • See that the selection is gone

I expected: the selection turns back to what it was before But got: the selection completely vanishes.

Tested under this environment:

  • OS Win-11
  • Version: 2024-03 (4.31)
  • Build id: I20231205-0520

Community

  • [x] I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.

Wittmaxi avatar Dec 29 '23 13:12 Wittmaxi

@Wittmaxi

I was trying to recreate this bug but thought of confirming here. When we select a couple of lines (a blue colour highlight happens over the lines due to the selection) and change the scope from All to Selected lines there occurs a second layer of highlight over the already highlighted text. When we change the scope back to All the second layer of highlight as well as the highlight due to the selection, both disappears. This is the behaviour that I see. 



Expected behaviour : when we change the scope from All to Selected lines the second layer of highlight should only be removed but not the highlight that happened due to the selection.

Is this the intended behaviour?


elsazac avatar Mar 05 '24 11:03 elsazac

@elsazac I'm not sure what you mean by a "Second layer of highlight". Could you please provide a screenshot?

fedejeanne avatar Apr 12 '24 07:04 fedejeanne

@fedejeanne I believe that he refers to the selection turning into a search-scope, which has another color.

Yes, what you see is the intended behavior - I remember trying to reinstate the old selection after going back to "All". It somewhat worked but lead to some other issues (I believe it had to do with questions about how to handle a user selecting something manually while the scope being active). @HeikoKlare and I finally decided to drop that for now (and keep the old behavior of the dialog, which does exactly that!)

Wittmaxi avatar Apr 12 '24 07:04 Wittmaxi