Open xPMo opened 5 years ago
After looking at Zsh's source code, the variable responsible for keeping track of this is vilinerange
, and it is not exposed to ZLE widgets. This may be impossible unless the Zsh devs choose to make that available.
We may be able to partially track this ourselves by wrapping the visual-line-mode
and vi-yank-whole-line
widgets. Tracking this for vi-yank
(yy
) will be tricker.
Currently, yanks in zsh do not preserve trailing newlines when sent to vim/nvim. Vim and Nvim will use linewise-puts if the text in the register ends with a newline. Zsh will use linewise-puts if the register contains "a sequence of lines" [sic] according to
man zshzle
.