Re: setpos() behaves erratically at times

2016-09-27 Fir de Conversatie Axel Bender
@ Christian Thanks for your reply. I know that the mode cannot be possibly guessed from the positions used with setpos() (although some rough guesses could be made). That's why I proposed to have an extra parameter to setpos() or visualmode() (instead of calling e.g. execute "normal v\") some

Re: setpos() behaves erratically at times

2016-09-27 Fir de Conversatie Christian Brabandt
Hi Axel! On Di, 27 Sep 2016, Axel Bender wrote: > There's no direct connection. It was however the origin of my > "troubles". The main problem - meanwhile - is the behavior of > setpos()/getpos(). When setting "'<" and "'>" vim takes into > consideration the last Visual mode, which is not what I

Re: setpos() behaves erratically at times

2016-09-27 Fir de Conversatie Axel Bender
There's no direct connection. It was however the origin of my "troubles". The main problem - meanwhile - is the behavior of setpos()/getpos(). When setting "'<" and "'>" vim takes into consideration the last Visual mode, which is not what I would have expected (and haven't found any

Re: setpos() behaves erratically at times

2016-09-27 Fir de Conversatie Christian Brabandt
Hi Axel! On Di, 27 Sep 2016, Axel Bender wrote: > Thanks for your reply. > > From my point of view this a joint problem of getpos()/setpos() - > unless the docs state it's not (I haven't found any info on that > though; I found something (inofficial) here however: >

Re: setpos() behaves erratically at times

2016-09-27 Fir de Conversatie Axel Bender
Thanks for your reply. >From my point of view this a joint problem of getpos()/setpos() - unless the >docs state it's not (I haven't found any info on that though; I found >something (inofficial) here however: >http://learnvimscriptthehardway.stevelosh.com/chapters/15.html). Maybe there

Re: setpos() behaves erratically at times

2016-09-27 Fir de Conversatie 'Jürgen Krämer' via vim_dev
Hi, Axel Bender schrieb am 25.09.2016 um 12:36: > IS the conclusion I made in my previous post correct? > > Can we generally NOT assume to start in CHARWISE Visual mode when entering > operator-pending mode? > > If so, where would that be described in the docs? I'm not sure, but you are

Re: setpos() behaves erratically at times

2016-09-25 Fir de Conversatie Axel Bender
IS the conclusion I made in my previous post correct? Can we generally NOT assume to start in CHARWISE Visual mode when entering operator-pending mode? If so, where would that be described in the docs? -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your

Re: setpos() behaves erratically at times

2016-09-23 Fir de Conversatie Axel Bender
Addendum 2: The problem also shows up when the setpos() is fed with the correct List (i.e. four elements). @Jürgen It seems that this is the trigger, you're right. However, as I take it from the docs, the mode - when entering operator-pending mode - should be charwise Visual mode. That said,

Re: setpos() behaves erratically at times

2016-09-23 Fir de Conversatie 'Jürgen Krämer' via vim_dev
Hi, Axel Bender schrieb am 22.09.2016 um 16:03: > The following image shows an erratical behavior of setpos() that I > cannot explain. When calling setpos("'<", ...), setpos("'>", ...) for > that matter, the behavior is OK for the first calls to setpos(). > However, from a certain number of

Re: setpos() behaves erratically at times

2016-09-23 Fir de Conversatie Axel Bender
Addendum: Looking into the code, I found that a possible location for this to happen might be list_find_nr() in list.c. I have to add that, revising my use of setpos(), I called the function like this: setpos("'<", [0, 532, 83]), i.e. I left out the "off" list member. As this did not result in

Re: setpos() behaves erratically at times

2016-09-22 Fir de Conversatie Axel Bender
A line like this (the parens are in the right position): --- cut here --- When you're trying to think about how to define a new operator- () movement, you can think of it like this: --- cut here --- The function was called in operator-pending mode via "cib" (replacement function for the

Re: setpos() behaves erratically at times

2016-09-22 Fir de Conversatie Nikolay Aleksandrovich Pavlov
2016-09-22 19:24 GMT+03:00 Axel Bender : > Cannot confirm this. Please look at the two setpos() statements - both > returning 0 (green = successfull). The statements were given in a debug > session; no cursor movement in between. The desired positions were not set >

Re: setpos() behaves erratically at times

2016-09-22 Fir de Conversatie Axel Bender
Cannot confirm this. Please look at the two setpos() statements - both returning 0 (green = successfull). The statements were given in a debug session; no cursor movement in between. The desired positions were not set (yellow and blue). The '< register is set to the first column, the '>

Re: setpos() behaves erratically at times

2016-09-22 Fir de Conversatie Christian Brabandt
Hi Axel! On Do, 22 Sep 2016, Axel Bender wrote: > The following image shows an erratical behavior of setpos() that I > cannot explain. When calling setpos("'<", ...), setpos("'>", ...) for > that matter, the behavior is OK for the first calls to setpos(). > However, from a certain number of

setpos() behaves erratically at times

2016-09-22 Fir de Conversatie Axel Bender
The following image shows an erratical behavior of setpos() that I cannot explain. When calling setpos("'<", ...), setpos("'>", ...) for that matter, the behavior is OK for the first calls to setpos(). However, from a certain number of calls (cannot specify), or triggered by some event (that I