Bug 546170 - [find/replace] Find/Replace dialog not defaulting to "Selected Lines" when brought up while multiple lines are selected on Ubuntu 18.10
Summary: [find/replace] Find/Replace dialog not defaulting to "Selected Lines" when br...
Status: RESOLVED NOT_ECLIPSE
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.11   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Sravan Kumar Lakkimsetti CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate, needinfo
Depends on:
Blocks:
 
Reported: 2019-04-06 06:12 EDT by Gregory Kramida CLA
Modified: 2019-04-07 09:20 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gregory Kramida CLA 2019-04-06 06:12:20 EDT
Platform Version: 4.11.0.v20190307-0500

The same exact version of eclipse behaves as intended on Ubuntu 18.04 but breaks expected behavior on Ubuntu 18.10.

Intended/original behavior: when Find/Replace dialog is opened, iff there are multiple lines of text selected, "Selected lines" is automatically selected for scope (which is a great productivity booster as it doesn't require user to switch from keyboard to mouse just to click the setting and then re-select intended lines).

Current/regressed behavior: when Find/Replace dialog is opened with multiple lines of text selected, the text selection is automatically undone and first line of the former selection is automatically copied to the "Find" prompt of the dialog.
Comment 1 Gregory Kramida CLA 2019-04-06 06:45:50 EDT
initFindStringFromSelection method of org.eclipse.ui.texteditor.FindReplaceDialog might be a good initial point to start debugging this.

https://github.com/eclipse/eclipse.platform.text/blob/ed76a4ee96d3a0ea40b6bf4d1447f2af49cb9f7f/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindReplaceDialog.java#L1128


(Thanks for pointer to SO user greg-449)
Comment 2 Holger Voormann CLA 2019-04-06 06:48:28 EDT
See https://stackoverflow.com/q/55547720
Comment 3 Dani Megert CLA 2019-04-06 09:54:56 EDT
Can you reproduce with https://download.eclipse.org/eclipse/downloads/drops4/R-4.11-201903070500/ ?

It works for me, but I'm on Windows 7.

Sravan, can you please check.
Comment 4 Gregory Kramida CLA 2019-04-06 20:50:55 EDT
Gentlemen, good news (I guess not for me, though).

I was *not* able to replicate it on a completely newly-installed Ubuntu 18.10 VM on my laptop, which would mean the issue is somehow localized to my home desktop machine. If you have any pointers on how to resolve it on my home machine, though, I would greatly appreciate them before this bug is closed.
Comment 5 Dani Megert CLA 2019-04-07 09:20:39 EDT
(In reply to Gregory Kramida from comment #4)
> Gentlemen, good news (I guess not for me, though).
> 
> I was *not* able to replicate it on a completely newly-installed Ubuntu
> 18.10 VM on my laptop, which would mean the issue is somehow localized to my
> home desktop machine. If you have any pointers on how to resolve it on my
> home machine, though, I would greatly appreciate them before this bug is
> closed.
Did you maybe install some additional plug-in(s) on your home desktop? Another possibility could be a clipboard tool.