Help with unexpected line paste break

I’ve noticed that my expected behavior of “yyp” has changed recently. I’m used to this operation being line-oriented and thus the paste would duplicate the current line below. NOW, my the behavior has changed to character oriented (I think) because this ends-up just pasting inline wherever the cursor is.

I’ve tried running with -u NONE and behavior is back to normal, so that means some plugin or something in my own init has caused this. What should I look for to try to track this down? Should I be looking for a mapping, or some “verbose set SOMESETTING?” query perhaps? I appreciate any tips about how track down the culprit.


I’ve narrowed this down to a custom TextYankPost action that is outlined here: Copying to clipboard from tmux and Vim using OSC 52 - The Terminal Programmer

specifically this line:

    call writefile([escape], '/dev/tty', 'b')

if I comment out this line, my paste behavior is line oriented again. I’ve tried wrapping this in a try-catch, but there doesn’t seem to be any exception. I wonder what it is about writefile that can cause this…