Skip to content

Yank commands always append a newline character to the clipboard #17

Open
@drowning-cat

Description

@drowning-cat

Yank commands, such as "+yiw or {Visual}"+y, append a newline to the clipboard. Even copying a single character adds a newline.

Currently I am using linux/wayland with wl-clipboard.

This issue can be patched with the following code:

elif (( $+WAYLAND_DISPLAY & $+commands[wl-paste] )); then
	zstyle :zle:evil-registers:'\*' put  - wl-paste -p -n
	zstyle :zle:evil-registers:'+'  put  - wl-paste -n
	zstyle :zle:evil-registers:'\*' yank - wl-copy -n -p # PATCH: added '-n'
	zstyle :zle:evil-registers:'+'  yank - wl-copy -n    # PATCH: added '-n'

It’s possible that a newline is being added somewhere in the plugin.
It may work this way with another clipboard adapters.

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