这是indexloc提供的服务,不要输入任何密码
Skip to content

Pasting via long press causes issues in some programs #678

@easyaspi314

Description

@easyaspi314

Newlines when pasting have strange effects.

This is most noticeable and reproducable in nano.

Steps to reproduce with nano:
Put this into a file:

This
Is
A
Test

Copy the file contents to the clipboard:

cat file | termux-clipboard-set

Open that same file in nano -w, put the cursor to the beginning, long press, paste.

ThisThis Is A Test Is A
Test

Should be:

This
Is
A
Test
This
Is
A
Test

or similar. The same version of nano on iTerm2 has no issue, so it is likely a Termux issue.

cat also has this issue:
Manually:

$ cat
This
This
Is
Is
A
A
Test
Test^D
$

With clipboard:

$ cat
This
Is
A
TestThis
Is
A^D
Test^D$

Upon the first ^D, Test is shown, and then the second finishes the cat without an ending newline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions