Closed tksoh closed 3 years ago
When you say "highlight and copy", do you mean like using Ctrl+C (or the menu command), or that you highlight in Nedit5, and then middle-click in NG?
I can say that one of my motivators for creating NG was that sometimes C&P operations in Nedit5 on modern systems would just... stop working until I restarted the app. I don't know if that's what you're encountering, but I can say that NEdit5's C&P was sometimes flakey.
But this also could be a mime-type issue where NEdit5 is copying the text to the copy buffer and is just using a mime type that I haven't accounted for in NG :shrug:
Either way, I'll be looking into it.
When you say "highlight and copy", do you mean like using Ctrl+C (or the menu command), or that you highlight in Nedit5, and then middle-click in NG?
Ctrl-C to copy
I can say that one of my motivators for creating NG was that sometimes C&P operations in Nedit5 on modern systems would just... stop working until I restarted the app. I don't know if that's what you're encountering, but I can say that NEdit5's C&P was sometimes flakey.
FWIW, I have used nedit for many years across various unix/linux platforms, but I can't recall having much issue with copy-and-paste, if at all.
FWIW, I have used nedit for many years across various unix/linux platforms, but I can't recall having many issues with copy-and-paste, if at all.
I hear ya, I've been a user of NEdit since around 1998 (it was the recommended graphical editor at my college!) and for the longest time, across tons of systems I never had any issues with it.
It wasn't until I started using it on modern systems that I started to notice quirks.
Unfortunately, I just tried it on my native Gentoo/KDE box and the copy/paste seems to work correctly, and additionally, I have an Ubuntu 20/XFCE VM that also didn't show the problem.
I'll see if I can replicate on Mint. Is there a specific desktop you are using? I see 3 options,
Cinnamon, MATE, and Xfce
I am running LXDE vis VNC. I can try to test it out on the system directly to see if VNC is somehow responsible too.
That would be helpful, I'll look into replicating your setup too.
@tksoh Assuming that this is still an issue (unfortunately, I cant replicate this), can you do an experiment to help diagnose the issue?
Basically in src/TextArea.cpp
, I'd like to add the following debugging:
line 4930, change:
const QMimeData *const mimeData = QApplication::clipboard()->mimeData(QClipboard::Clipboard);
if (!mimeData->hasText()) {
return;
}
To
qWarning("Pasting Attempted!");
const QMimeData *const mimeData = QApplication::clipboard()->mimeData(QClipboard::Clipboard);
if (!mimeData->hasText()) {
qWarning() << "NEdit: Unknown mime-type being pasted!:" << mimeData->formats();
return;
}
Basically adding a debug statement for whenever pasting via Ctrl-V is attempted. And if it just doesn't like the mime type, say so and print out some information about the clipboard data. Having a weird mime-type is kinda the only explanation that I can think of off hand. Maybe VNC plays weird games with the clipboard that we need to account for?
Basically I
I just tried it again. Somehow the issue has mysteriously disappeared, with the latest commit and the older ones. What's even stranger is that the middle mouse button click that never worked for me, now seems to be working normally. I am guessing it's probably has to do with VNC. I will keep monitoring, but we can close this issue for now.
Been having this same general issue with cut-n-paste on Fedora 33 for a while. Setting Wayland=False in /etc/gdm/custom.conf followed by reboot fixed the issue. I'm planning to update to Fedora 35 soon. Perhaps a newer version of Wayland has fixed this copy-n-paste failure modes. I imagine the same solution will work on Ubuntu which also uses Wayland.
Interesting, sounds like a Qt + some versions of Wayland issue perhaps?
I finally got around to upgrading from Fedora 33 to Fedora 35. Basically, this problem persists into Fedora 35. Just to leave a trail in this thread.
WaylandEnable=true
in my /etc/gdm/custom.conf
After reboot:
I start up nedit-ng I see the following warnings:
Warning: QSocketNotifier: Can only be used with threads started with QThread
Warning: QPixmap: QGuiApplication must be created before calling defaultDepth().
Warning: QPixmap: QGuiApplication must be created before calling defaultDepth().
Warning: QPixmap: QGuiApplication must be created before calling defaultDepth().
Warning: QPixmap: QGuiApplication must be created before calling defaultDepth().
Warning: Wayland does not support QWindow::requestActivate()
Then during usage of nedit-ng I note that Middle mouse copy+paste does not work with nedit-ng but menu-based paste does between applications (e.g. Xterm <-> Nedit-ng)
Although middle mouse copy+paste does work within nedit-ng. This might suggest that Wayland isn't sharing the alternate/application clipboard that historically provides the middle mouse copy+paste familiar to long-time nedit (Motif) users. Or perhaps nedit-ng needs to do something more extensive to share copy buffer on all clipboards or something like that.
WaylandEnable=false
in my /etc/gdm/custom.conf
After reboot: There are no warnings. Middle mouse copy+paste works both within nedit-ng and between applications and nedit-ng in either direction.
For now, I'll keep WaylandEnable=false
in my /etc/gdm/custom.conf
in Fedora 35.
On Linux Mint 19.3 with latest master commit...
nedit to NG & xed :
xed to NG & nedit:
NG to nedit & xed: