diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2025-04-16 03:08:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-16 03:08:41 -0700 |
| commit | 7432781e71842a595365c351b105971ac3662dff (patch) | |
| tree | 14ebdde485f6da1557f81b73b242df792459d865 /runtime/lua/_vim9script.lua | |
| parent | 07d06dd39627ff8fab42985069a26ba54918251f (diff) | |
| download | rneovim-7432781e71842a595365c351b105971ac3662dff.tar.gz rneovim-7432781e71842a595365c351b105971ac3662dff.tar.bz2 rneovim-7432781e71842a595365c351b105971ac3662dff.zip | |
fix(mouse): do not fetch clipboard twice when pasting with middle button #33494
Problem:
When doing paste operation mouse code tries to figure out it it is
dealing with a multi-line register by calling yank_register_mline(),
which fetches register data and checks its type. Later the code calls
either do_put() or insert_reg() which fetch register data again. This is
unnoticeable when working with internal neovim registers, but starts
hurting when dealing with clipboards, especially remote one (forwarded X
or socket tunnel or similar).
Solution:
Change yank_register_mline() to also return pointer to the
register structure prepared for pasting, and insert_reg() to accept
such register pointer and use it if it is supplied. do_put() already
has support for accepting a register structure to be used for pasting.
Fixes #33493
Diffstat (limited to 'runtime/lua/_vim9script.lua')
0 files changed, 0 insertions, 0 deletions