Closed Deraen closed 9 years ago
I got this working by yanking the whole toplevel form in one operation and then using strpart to select start and end parts. To find the cursor position I calculate number of characters in yanked text from start of the form to cursor pos.
You're saving 'selection'
and 'clipboard'
but best I can tell aren't changing them to safe values. If you can manage it, I would rather avoid that dance entirely and use getline()
. I think this logic would work.
Thanks, that works.
Other comments before I start cleaning this?
I haven't fully digested the logic but looks good to me. I would favor pulling s:pos_inside_selection
inline.
Okay should be cleared now.
Thanks for figuring this out; I'm excited to try it.
Fixes #212
This is still work in progress but I opened this for comments and help.
My current strategy is to first yank from start of toplevel form to cursor and then from cursor to end of the form. Problem is that the latter yank is not working.