Re: Bugs in visual mode marks?

2022-09-27 Thread Lifepillar
On 2022-09-27, M wrote: > You're using cmd token that doesn't switch the modes. The effect is that as > long as you're in visual mode the < and > marks are not updated. This is > the way how it works and always worked. Aha, that's it! In fact, I have switched to use when I have migrated to Vim

Re: Bugs in visual mode marks?

2022-09-27 Thread M
вт, 27 сент. 2022 г., 22:33 Lifepillar : > Source this script: > > vim9script > > def g:Select(): list > const lnum1 = getpos("'<")[1] > const lnum2 = getpos("'>")[1] > return getline(lnum1, lnum2) > enddef > > vnoremap x echo Select() > > Then select some

Re: Bugs in visual mode marks?

2022-09-27 Thread Lifepillar
Source this script: vim9script def g:Select(): list const lnum1 = getpos("'<")[1] const lnum2 = getpos("'>")[1] return getline(lnum1, lnum2) enddef vnoremap x echo Select() Then select some line(s) and type \x. What I would expect (and what I think Vim used to

Re: Bugs in visual mode marks?

2022-09-27 Thread Lifepillar
On 2022-09-27, Lifepillar wrote: > Today, I checked the value of getpos("'>") after selecting some text, > and got: > > [0, 15, 2147483647, 0] Now I have seen that the large number is expected. I will try to make a reproducible example of my issue. Life. -- -- You received this message

Bugs in visual mode marks?

2022-09-27 Thread Lifepillar
Has something changed recently in the way Visual mode marks are handled? I have a couple of functions using '<, '> and the like and they have started misbehaving recently. Today, I checked the value of getpos("'>") after selecting some text, and got: [0, 15, 2147483647, 0] This using Vim