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 probably right.

I don't see an inherent connection between visual mode -- be it
charwise, linewise, or blockwise -- and operator-pending mode, and I
could not find anything in the help suggesting such a connection. Where
did you see this?

Actually, setpos() does set the position correctly. It's getpos() that
reports the first and last column differently if the last visual mode
was linewise. You can call visualmode() with a non-zero number or a
non-empty string to clear the visual mode. Further calls of visualmode()
will than return an empty string. But this does not seem to clear the
internal flag that is used by getpos("'>") or gv, for example. This
might be a bug, but I'm not sure about this.

Probably the best solution for your problem is to mark the relevant text
by selecting it in visual mode, or to use setpos() after entering and
leaving charwise visual mode to reset the blockwise flag.

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us.     (Calvin)

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui