Tuesday, August 5, 2025

Re: getpos()

It wasn't about efficiency, I just didn't want to use l2+2 to accomodate the shift that would happen if I add before l1 first.


On Tuesday, August 5, 2025 at 4:48:55 PM UTC+10 Russell Shaw wrote:
On 5/8/25 13:53, Maxim Kim wrote:
> oops,
>
> instead of getpos() you can use line() of course:
>
> vim9script
> def g:Comment(line1: number, line2: number)
>     var l1 = min([line1, line2])
>     var l2 = max([line1, line2])
>     append(l2, ["

No comments: