Jacob Niehus wrote:

> Ex commands that have no keys typed aren't saved to command history.
> If an omap contains an ex command and the operation is repeated with
> '.', the ex command is saved to history because Vim considers the
> command to be typed because the period was typed.
> 
> Simple example:
> 
> vim -u NONE -i NONE -N -c 'onoremap S :normal! j<CR>' -c 'call 
> feedkeys("dS.", "t")' -c 'echo histget(":", -1)'
> 
> ":normal! j" is saved to the command history even though it was only
> executed as part of an omap.
> 
> Is this behaving as intended or should it be fixed? Is there a way to
> fix it without handling a '.' as a special case in vgetorpeek()?
> 'nnoremap . .' is an easy solution.

I would expect "." to never add a command to history, since the command
was not typed.  Smells like a bug to me.

-- 
ARTHUR:  Well, I AM king...
DENNIS:  Oh king, eh, very nice.  An' how'd you get that, eh?  By exploitin'
         the workers -- by 'angin' on to outdated imperialist dogma which
         perpetuates the economic an' social differences in our society!  If
         there's ever going to be any progress--
                                  The Quest for the Holy Grail (Monty Python)

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

Raspunde prin e-mail lui