pop-os / cosmic-edit

COSMIC Text Editor
GNU General Public License v3.0
226 stars 51 forks source link

Search/replace types replace text in both fields #234

Open zsilet opened 3 weeks ago

zsilet commented 3 weeks ago

This morning I tried to search/replace using COSMIC editor.

  1. I initially launched Search via Edit->Find menu, and typed the text I was looking for.
  2. Then Edit->Replace, realizing that the search in 1) did not give me a replace option (would be nice to have something right next to the search dialog, but that's not the issue.
  3. Once the search and replace text fieds were both visible, I clicked in the replace field and started typing.
  4. ISSUE - the text I type in the replace field also modifies the search field (see image below) image

The issue is easily reproducible, every time I use the mouse to move the cursor between search and replace, the cursor ends up active in both boxes. If I tab between the boxes, the cursor moves correctly to the target.

Software versions: sys_info_sw_2024-Aug-20-1709.txt

git-f0x commented 3 weeks ago

Similar to pop-os/cosmic-settings#452.

zsilet commented 2 weeks ago

Note that the issue can also happen whereby one cursor is in the main editor area and the other cursor is in the Seach box.

git-f0x commented 2 weeks ago

That's probably related to #185.

zsilet commented 2 weeks ago

In addition to the above, I found this odd, likely related scenario:

Steps to reproduce: 1) Create file with two lines, containing text1 and text2. 2) Ctrl-C text1 3) Ctrl-V text1 (verify that copy/paste works, line1 now contains text1text1) 4) Ctrl-F, leave find term blank. 5) Ctrl-C text2 6) Ctrl-V, (problem) observe that text1 is pasted into the Find field (instead of text2 in the main window)

Agreed with @git-f0x that this issue is likely related to two others he mentioned.

zsilet commented 2 weeks ago

It seems like all hotkeys end up going to the Find dialog, as I cannot save a file via Ctrl-S while the Find dialog is open either. Just realized that's likely the reason I've been having hit-n-miss time saving files in the editor.

leb-kuchen commented 2 weeks ago

Updating libcosmic should fix it.

git-f0x commented 2 weeks ago

It seems libcosmic is already updated for cosmic-edit, but the issue is still present.