contour icon indicating copy to clipboard operation
contour copied to clipboard

Copied text gets pasted twice

Open RafTeog opened this issue 1 year ago • 9 comments

Contour Terminal version

Contour Terminal Emulator 0.5.1

Installer source

something else (please specify below)

Operating System

Linux artix-dinit 6.11.2-artix1-1 #1 SMP PREEMPT_DYNAMIC Sat, 05 Oct 2024 05:12:42 +0000 x86_64 GNU/Linux

Architecture

x86-64

Other Software

n/a

Steps to reproduce

  1. Copy text from firefox (also tested contour terminal)
  2. Paste on terminal
  3. Observe the bug

Expected Behavior

The text to be pasted only once.

Actual Behavior

The text gets pasted twice

Additional notes

This is a fresh artix-dinit install with Hyprland.

RafTeog avatar Oct 13 '24 14:10 RafTeog

Hey @RafTeog

Many thanks for your interest in Contour. I sadly cannot reproduce this just yet. Would you mind sharing the configuration you used?

christianparpart avatar Oct 13 '24 19:10 christianparpart

Hey @christianparpart thanks for the reply! I acutally installed and used as it is. The default config.

RafTeog avatar Oct 13 '24 19:10 RafTeog

Hey @christianparpart thanks for the reply! I acutally installed and used as it is. The default config.

Maybe you can share output of contour debug pty.input when this is happening ?

Yaraslaut avatar Oct 13 '24 19:10 Yaraslaut

Hey, thx for the reply. So, I basically run the command you provided, and I noticed it opens a terminal window. Cool, then I copied the <Maybe you can share output of contour debug pty.input when this is happening ?> from your message here. When I pasted in a new terminal window I opened, as it is doing, it pasted twice. But, the previous one, that was still returning , gave me this:

< master received: "\e[A\r\e[01;36m[raf@artix-dinit\e[01;37m \x7e\e[01;36m]$\e[00m Maybe you can share output of contour debug pty.input when this is happening ?\e[7mMaybe you can share output of contour debug pty.input when \e[27m\e[7mt\e[27m\e[7mhis is happening ?\e[27m"

RafTeog avatar Oct 14 '24 00:10 RafTeog

17288650380072192257143428642865

RafTeog avatar Oct 14 '24 00:10 RafTeog

The second paste comes in selected even.

RafTeog avatar Oct 14 '24 00:10 RafTeog

Does it happen only for contour? Contour receive this text twice, so we can not ignore it, as for why this is happening most likely wm can provide some debug info

Yaraslaut avatar Oct 14 '24 04:10 Yaraslaut

Hey, in firefox itself, meaning when I paste anything on firefox (url or inside a website, for instance), it does not happen. I will try on another apps I have. It is a brand new instalation, so I will take my time to install something. If you want to suggest apps, its all cool, as long as it is on the world/galaxy/aur repositories. The artix system I installed is for learning purposes only. The intent here is to help and learn, feel free to ask :)

RafTeog avatar Oct 14 '24 11:10 RafTeog

It might also be a Hyprland thing. I'm having a Hyprland around that I could try to repro it. Many thanks for your input so far, @RafTeog :)

christianparpart avatar Oct 14 '24 11:10 christianparpart

Just trying contour 0.5.1.7247 on ARM M3 macOS 14.6.1 and found shift+control+v to paste gives me double input as well. Nothing configured, not even installed - running directly from the DMG disk image.

From the Apple terminal app, trying to paste word contour into bash in contour:

$ cd /Volumes/Contour-0.5.1.7247-Darwin/contour.app/Contents/MacOS
$ ./contour debug pty.input  # and copy "contour" to the clipboard
[2024-11-06 23:42:08.866139] [pty.input] master received: "bash-3.2$ "
[2024-11-06 23:42:08.881289] [pty.input] master received: "\r\e[Kbash-3.2$ "
[2024-11-06 23:42:09.022017] [pty.input] master received: "\r\e[Kbash-3.2$ "
[2024-11-06 23:42:11.377417] [pty.input] master received: "co"
[2024-11-06 23:42:11.377463] [pty.input] master received: "ntour"
[2024-11-06 23:42:11.377491] [pty.input] master received: "co"
[2024-11-06 23:42:11.377512] [pty.input] master received: "ntour"

You do seem to be getting the input twice, no idea why.

(command+v didn't paste within contour by default which was surprising but I've not attempt to configure anything yet)

peterjc avatar Nov 06 '24 23:11 peterjc

Hi @peterjc, i can repro this, but this is only due to default config where we have same entries, this will be fixed in next release

Yaraslaut avatar Nov 08 '24 06:11 Yaraslaut

Hi @RafTeog does this behavior persist? we fixed issue with default config so it should not appear again for new users but you have to manually delete repeating entry in your config file

Yaraslaut avatar Nov 22 '24 02:11 Yaraslaut

Hey, sorry for the delay. But great news! I had to delete the partitions, so I will have to reinstall artix and give it another try. Thanks again and glad I could help improve things :)

RafTeog avatar Nov 27 '24 01:11 RafTeog

I found this issue because I'm encountering it as well. I can confirm that it is not a Hyprland issue (as suggested above) and it is unrelated to wayland since I'm using i3 on X11 and i've got xclip 0-13.6 installed. The buffer is pasted twice and the second set of text is selected. It should also be noted that Contour does not recognize the ctrl+Shift+C binding, but it does recognize ctrl+Shift+V.

mortis-est avatar Jan 01 '25 18:01 mortis-est

Can you please check your config file @mortis-est ?

Yaraslaut avatar Jan 01 '25 19:01 Yaraslaut

contour.txt

mortis-est avatar Jan 02 '25 00:01 mortis-est

contour.txt

you can see in your config file two entries for the PasteClipboard action, that is why you get text pasted twice, and no keybinding for C-S-c to copy selection

Yaraslaut avatar Jan 02 '25 07:01 Yaraslaut