http://code.google.com/p/vim/source/browse/src/ex_docmd.c?r=79c59b4c9d20e5d7de9b5018062289d9a21887e4#2487:

>     #ifdef FEAT_USR_CMDS
>           valid_yank_reg(*ea.arg, (ea.cmdidx != CMD_put
>                                                  && USER_CMDIDX(ea.cmdidx)))
>     #else

Here expression `(ea.cmdidx != CMD_put && USER_CMDIDX(ea.cmdidx))` is 
effectively the same thing as `USER_CMDIDX(ea.cmdidx)`. I am not sure what 
exactly was meant, but based on the fact that

    yank /

and

    delete /

do nothing without any errors and register `/` is excluded from match when 
second argument to valid_yank_reg is true I assume this should’ve been 
`(ea.cmdidx != CMD_put && !USER_CMDIDX(ea.cmdidx))`: for :put command and user 
commands all registers will be valid, for others registers like `/` will throw 
an error.

Patch without a test (I failed to find any tests for :yank or :delete):

*** /tmp/extdiff.y9BxRE/vim-upstream.79c59b4c9d20/src/ex_docmd.c        
2014-10-12 23:30:54.924767233 +0400
--- /home/zyx/a.a/Proj/c/vim-upstream/src/ex_docmd.c    2014-10-12 
23:30:01.284767830 +0400
***************
*** 2485,2491 ****
        if (
  #ifdef FEAT_USR_CMDS
            valid_yank_reg(*ea.arg, (ea.cmdidx != CMD_put
!                                                  && USER_CMDIDX(ea.cmdidx)))
  #else
            valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put)
  #endif
--- 2485,2491 ----
        if (
  #ifdef FEAT_USR_CMDS
            valid_yank_reg(*ea.arg, (ea.cmdidx != CMD_put
!                                                  && !USER_CMDIDX(ea.cmdidx)))
  #else
            valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put)
  #endif

-- 
-- 
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/d/optout.

Raspunde prin e-mail lui