marimo-team / vscode-marimo

marimo vscode extenion
https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo
MIT License
17 stars 3 forks source link

Pasting results in the clipboard content to be pasted twice #14

Closed janmechtel closed 2 months ago

janmechtel commented 5 months ago

On Fedora Gnome Wayland VsCode whenever I paste, the content ends up being pasted twice.

It doesn't happen in Firefox/Chrome.

mscolnick commented 4 months ago

I cannot repro this on my vscode for MacOS. This is likely an OS edge-case.

Open to a contribution as I am not sure the correct fix. The code lives in src/launcher/panel.ts, and possibly this needs some changes:

case "paste": {
    env.clipboard.readText().then((text) => {
      this.nativePanel?.webview.postMessage({
        command: "paste",
        text: text,
      });
    });
    return;
  }
gazzar commented 3 months ago

This is also happening on VSCode in Windows 11. Not sure if it's helpful, but I noticed that if I instead do a Shift-Ctrl-V, it only pastes a single copy of the clipboard contents.

poldap commented 3 months ago

Happens in Fedora and Ubuntu here. It's strange it happens in Windows and Linux and not in Mac OS.

mscolnick commented 2 months ago

Is anyone still experiencing this issue? We made some changes that may have fixed this.

gazzar commented 2 months ago

I just updated to 0.4.10. I tried again in wsl (ubuntu Linux) in Windows and I couldn't find any problem with the paste behaviour now. Also, the kernel used to crash a lot and that seems much more stable now. Well done!

mscolnick commented 2 months ago

Awesome! There is another improvement we can make by sharing the server across files - since the kernel does allow for multiple files now.