yousseb / meld

Meld for macOS
https://yousseb.github.io/meld/
GNU General Public License v2.0
2.29k stars 120 forks source link

Content copied from meld cannot be pasted into the software of jetbrains #89

Open mtjo opened 5 years ago

mtjo commented 5 years ago

Developers use jetbrains's software should also find

juniorjp commented 4 years ago

I just found out this 👍

halmai commented 3 years ago

Some minor addition: the content I copy from Meld cannot be pasted into Goland (JetBrains) but can paste it to many other software, like TextEdit, ITerm2, LibreOffice, and so on.

If I paste it into TextEdit, select it in TextEdit and copy it to the clipboard again then I can paste it into Goland.

Seemingly, the way how Meld puts the content onto the clipboard is not a standard plain text representation.

Hopefully it is an easy fix but it definitely should be done.

JacksonBailey commented 2 years ago

Like @halmai before me I have ran into this issue from GitLab and ended up here as well. I will leave my findings in hopes to help the next person or possibly the developers to fix it. (Thank you @halmai for being a good steward and better than DenverCoder9.)

First, for the tired and weary, a workaround. Paste into anything else (like VS Code) then copy and paste that into IntelliJ (or whatever JetBrains product like GoLand) and it will work. Annoying but better than nothing.

I too suspected as well there was some sort of trickery with the copy format from Meld. In the way some times when you copy and paste things end up with the color and formatting versus not. I tried doing "paste as Plain Text" in IntelliJ but it still did not work.

I found this on superuser. I suspected the osascript -e 'xxxxxx' options might be useful but they didn't show anything that stuck out. However this suggestion to use this "Clipboard Viewer" tool shows a lot of information and very different information when copying from the below. I am listing the entries each shows.

  1. VisualStudio Code: public.html, Apple HTML pasteboard type, public.utf8-plain-text, org.chromium.web-custom-data
  2. Meld: dyn.<hex gibberish>, COMPOUND_TEXT, dyn.<different hex gibberish>, STRING, dyn.<more hex gibberish>, GTK_TEXT_BUFFER_CONTENTS, dyn.<you guessed it>, text/plain, dyn.<yes more>, TEXT, dyn.<more>, text/plain;charset=utf-8, public.utf8-plain-text, NSStringPboardType, dyn.<still more>, application/x-gtk-text-buffer-rich-text
  3. IntelliJ: dyn.<hex>, UTF8_STRING, dyn., TEXT, public.utf8-plain-text, NSStringPboardType, dyn., JAVA_DATAFLAVOR:application/x-java-jvm-local-objectref.....(this one is long and I don't think it is relevant)`
  4. iterm2: public.utf8-plain-text, NSStringPboardType

My gut feeling is the large number of entries from Meld are confusing IntelliJ when trying to paste. Also my other guy feeling is that this might be a problem on IntelliJ's side and not Meld because all of them have at least one in common (public.utf8-plain-text). Here is the issue I opened with JetBrains about this, IDEA-298235

I have downloaded the clipboard viewer tool and will look into uploading the zip to a repo incase it vanishes but that's a low priority. I think I have captured the important info and don't expect it to vanish in the next few days.

vhnguyenae commented 1 year ago

I ran into the same issue, luckily I use a clipboard manager tool (Flycut), so as a workaround I just need to use my keyboard shortcut (Cmd + Shift + V) to paste the latest content and it works fine :)