yanky.nvim
yanky.nvim copied to clipboard
feat: Add timer option to preserve cursor position functionality
This commit introduces an optional parameter, 'timer', to the 'preserve_cursor_position' feature. The inclusion of this parameter helps prevent a potentially jarring cursor jump after a lengthy multiline yank operation with a downwards motion.
Thanks for this PR !
I'm currently on vacation and I can't test and review this for the moment. I'll do this when I come back 😅
No worries no rush - enjoy you vacation!
Here are my configs
highlight = {
on_put = true,
on_yank = true,
timer = 500,
},
preserve_cursor_position = {
enabled = true,
timer = 458,
},
A possible additional improvement, for another PR, could be to conditionally jump back immediately if only one line is yanked.
Hey, Sorry for the late answer. Can you add a description of this option in the README here : https://github.com/gbprod/yanky.nvim/blob/main/README.md?plain=1#L507 and add the option here : https://github.com/gbprod/yanky.nvim/blob/main/README.md?plain=1#L497 Otherwise, it seems ok :)