nedit-ng icon indicating copy to clipboard operation
nedit-ng copied to clipboard

"Find" dialog overwrites X copy buffer (middle-click "clipboard")

Open insaner opened this issue 5 years ago • 4 comments

I'm really loving nedit-ng, it's exactly what I have been wanting to see for more than a decade! I hope soon all major distros will start including it.

The bug in the description is related to me using the X copy buffer (when you highlight text and then use the middle-click button to paste it.. which is separate and independent of the clipboard). When I use the find dialog to search for a string in nedit-ng, once it finds the string, it highlights it, but in so doing, overwrites the copy buffer, so when I go to middle-click paste my text, it now pastes the found string instead. (This middle-click paste is especially useful when copying text to and from a terminal -- I hardly ever use ctrl+c/ctrl+v)

I hope that's enough info to diagnose (and hopefully fix) the problem.

Thanks again for an amazing project!

insaner avatar Jun 21 '19 18:06 insaner

Thanks!

So it seems that the act of having a dialog such as find select the found text is grabbing the X selection?

Hmm, I mean, instinctively that's kinda what I would expect to happen since the selection is being changed...

I guess the difference is that this is not a selection caused by the mouse, but that has complicated because keyboard-based selections should work as well.

How does this behavior compare to classic nedit?

eteran avatar Jun 22 '19 21:06 eteran

Just tested it in classic nedit, you're right, the same thing happens: my X copy buffer is overwritten.

My other editor is kate (17.12.2 -- kde), and it doesn't happen there. I checked gedit (3.22 -- gnome) and it overwrites the copy buffer.

Interesting. In any case, I don't know if you agree (or worth your time and effort) but the non-copy buffer overwriting behavior is preferable to the overwriting behavior.

insaner avatar Jun 23 '19 07:06 insaner

OK, since nedit-ng acts as nedit does, I will consider this a feature request and not a bug. So I'm leaving it open, but can't promise when or if it'll be "fixed"

eteran avatar Jul 01 '19 13:07 eteran

No problem, I totally understand. I might at some point fork and implement some of these features myself. I'll let you know.

insaner avatar Jul 02 '19 05:07 insaner