cosmic-edit icon indicating copy to clipboard operation
cosmic-edit copied to clipboard

Search/replace types replace text in both fields

Open zsilet opened this issue 1 year ago • 7 comments

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

zsilet avatar Aug 21 '24 13:08 zsilet

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

git-f0x avatar Aug 23 '24 02:08 git-f0x

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.

zsilet avatar Aug 26 '24 16:08 zsilet

That's probably related to #185.

git-f0x avatar Aug 26 '24 16:08 git-f0x

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

  • Attempting to copy/paste within the main window, with the Find window open will force the paste into the find window
  • The string that will be pasted seems to be from the clipboard history (not the most recent item that was copied).

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 avatar Aug 26 '24 18:08 zsilet

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.

zsilet avatar Aug 26 '24 18:08 zsilet

Updating libcosmic should fix it.

bGVia3VjaGVu avatar Aug 27 '24 16:08 bGVia3VjaGVu

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

git-f0x avatar Aug 27 '24 17:08 git-f0x

I have re-tested the issues I had logged in this record, and they seem to have been solved along the way, so I am closing the issue.

zsilet avatar Nov 06 '24 15:11 zsilet