On a freshly installed Gnome, when I paste (ctrl-shift-v) something copied from leafpad to the terminal, I often see escape codes like this: ^[[200~/etc/fstab~ instead of just /etc/fstab and I have to remove them manually, else gnome-terminal tries to interpret them and says “substitution failed”. It seems to happen randomly, and if I paste again the same line, it sometimes appears correctly.
Anyone else seeing this too?
Just a related question… why leafpad? Gnome comes with Gedit (which isn’t bad) and there are better alternatives than leafpad IMHO… Never seen that behaviour in gedit or featherpad or mousepad or even nano, micro and kate…
I can paste with leafpad to gnome terminal with middle mouse button as well
Leafpad is great if all you want is Notepad, but on Linux. Gedit is good, but Leafpad is better for my “workflow” (occasionally opening a text file). Same reason I use Viewnior instead of “Gnome Photos” or EOG. I just need it to show me a picture when I click on it.
I use Leafpad all the time (well I use Micro all the time but if I use a GUI text editor i use Leafpad). I even replace Mousepad with Leafpad on Xfce and install it in any other DE that’s not Qt-based I am using.
As for the OP’s question… beats me. Right-clicking in terminal and chosing “paste” does not generate them.
Are you sure you are not marking too much text, like invisible marklers of some sort (like line numbers)?
I’ve been using leafpad in Gnome for years, never had this problem before… Anyway, I now can’t reproduce it anymore. Weird.
I used leafpad myself for a while (it can handle sudo better than mousepad) but on finding featherpad, I switched. I tend to use something with syntax highlighting, as so much of what I need to ‘quick’ edit as text is code of one sort or another (bash scripts, lua etc etc). Micro also fulfils this need with syntax highlights - but I haven’t always had it handy when I want it (differing distros) so I end up with nano as fallback…
Featherpad looks good but unfortunately is Qt.
With a few environment tweaks, that can be lived with (ie: Kvantum and qt5ct). And, at worst - it has its own dark mode, retaining syntax highlighting! However - that COULD be a reason to bypass I guess… If there was an equivalent in GTK, I’d give it a look, or course - but gedit has gone CSD (much worse than QT IMHO)
Update: it seems leafpad has nothing to do with this. It also happens when I copy text from the gnome-terminal and paste into it. If those escape codes appear, I can just paste again and after 1 or 2 tries they disappear. I can’t figure out why, I’ve been using Gnome for years and it never happened before.