When you do `:<C-U>` you effectively exit visual mode. Instead try to use `xnoremap <F5> <cmd>echow getpos(".") getpos("v")<CR>` On Sunday, July 27, 2025 at 7:55:33 PM UTC+10 russell shaw wrote:
> Hi, > > vim9script > vmap <F5> :<C-U>echo getpos(".") getpos("v")<CR> > > When i select a visual area of text, i get the same coordinate reported > for both > getpos(".") and getpos("v"). Why is that ? > -- -- You received this message from the "vim_use" 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_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_use/d8f28645-2466-4f48-b383-c05fcb26aa05n%40googlegroups.com.