Source this script:
vim9script
def g:Select(): list<string>
const lnum1 = getpos("'<")[1]
const lnum2 = getpos("'>")[1]
return getline(lnum1, lnum2)
enddef
vnoremap <leader>x <cmd>echo Select()<cr>
Then select some line(s) and type \x. What I would expect (and what
I think Vim used to do up to recently, unless I am missing something) is
that the *currently* selected lines are echoed. Instead, the
*previously* selected lines are printed. Can you reproduce it? Is it
a bug?
Tested with Vim 9.0.611.
Thanks,
Life.
--
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/tgvj5t%24rbc%241%40ciao.gmane.io.
No comments:
Post a Comment