Ingo Karkat wrote:

> Hello Vim developers,
> 
> Patch 7.3.590 allows to set the visual selection directly via the marks
> '< and '>. I've found a problem with :set selection=exclusive (while
> developing a custom mapping): When the first selection after Vim startup
> is defined via setpos(), then reselected (gv) and yanked (y), it
> includes one character too much, as if the non-default 'selection'
> setting isn't taken into account (even though gv displays the correct
> selection).
> 
> #v+
> fun! Test()
>     call setpos("'<", [0, 1, 2, 0]) | call setpos("'>", [0, 1, 4, 0])
>     normal! gvy
>     echomsg string(@@)
> endfun
> 
> set selection=exclusive
> call setline(1, 'foobar')
> call Test()
> " Should print "oo", actually prints "oob"
> " Observe that a ":normal! gv" will correctly select only 2 characters.
> " Do a different selection the usual way.
> normal! 03lvlly
> " Repeat the test.
> call Test()
> " Now prints "oo" correctly.
> #v-
> 
> To reproduce, use above scriptlet or the identical attached script:
>     vim -N -u NONE -S bug-exclusive-selection-register-set.vim
> 
> Reproducible on huge builds of Vim 7.4a.44 on Linux/x64 and Vim 7.3.823
> on Windows/x64.

I'll add it to the todo list.

-- 
How To Keep A Healthy Level Of Insanity:
3. Every time someone asks you to do something, ask if they want fries
   with that.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui