terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Pasting multiline text not working (in shell, vi and hangs kakoune)

Open ant5 opened this issue 1 year ago • 3 comments

Windows Terminal version

1.21.1382.0

Windows build number

10.0.19045.4291

Other Software

QEMU 9.0 with FreeBSD 14.1 guest. vi 2.2.1 kakoune-2024.05.18

Evironment: TERM=xterm-256color

Steps to reproduce

Copy multiline text:

builder {
        host.hostname = "builder";
        path = "/ws/builder";
        ip4 = "inherit";
        #ip4.addr = "igb0|192.168.0.28/25";
        #ip4.addr = "lo0|127.0.3.1/24";
        allow.raw_sockets = 1;
        exec.consolelog = "/var/log/jails/${name}_console.log";
        #mount.fdescfs;
    #mount.fstab="/etc/ws/${name}.fstab";
        mount.procfs;
        allow.set_hostname = 0;
        exec.start = "/bin/sh /etc/rc";
        exec.stop = "/bin/sh /etc/rc.shutdown";
        exec.clean;
        allow.mount;
    allow.mount.zfs;
    allow.mount.nullfs;
  1. Run vi editor. Press i for insert mode. Paste text.
  2. Run vi editor. Press \i for insert mode with no-hook processing. Paste text.

Expected Behavior

Pasted text inside editor.

Actual Behavior

  1. vi editor. WindowsTerminal ask about pasting multiline text. Then only two lines of text pasted: image

  2. kakoune editor. WindowsTerminal do not ask about pasting multiline text. Nothing happen on screen but kakoune hangs in mean of not responding to any key press:

image

Also in a pure sh shell pasting behave like in vi (pasted only first two lines):

image

ant5 avatar Jun 19 '24 12:06 ant5

Could this be the same as #17384?

lhecker avatar Jun 19 '24 12:06 lhecker

May be there is a relation but I dont't feel it the same:

  1. #17384 uses WSL
  2. #17384 goes to deadlock. In my case neither shell nor vi hangs. Kakoune hangs (stop responding) but if I'm inside tmux I can TERM it easily.
  3. #17384 has 4096 bytes pasted. In my case just two lines really pasted (appear).

As you can see on screenshot WT really send all text to paste but something brokes. May be it related to CR/LF.

Also I must add some info: on WT command chcp 65001 ran before QEMU run.

ant5 avatar Jun 19 '24 12:06 ant5

I looked at screenshots more carefully and found strange thing.

WT send text with CR as newline separator. Does it have to send LF or CRLF?

ant5 avatar Jun 20 '24 10:06 ant5