Hirohito Higashi wrote:

> 2016-2-15(Mon) 13:25:58 UTC+9 watiko:
> > Hi, Bram.
> > 
> > There is a related issue:
> 
> No.
> Reported issue also occurred in Vim 7.4.869.
> This patch doesn't matter.
> 
> > 
> > ```sh
> > vim -u NONE -i NONE -c 'nnoremap <expr> x getchar()'
> > ```
> > 
> > Then type "x<S-Space>" and "iX<Esc>", I got too many "X"s. 
> > 
> > ```version
> > VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Feb 15 2016 13:19:05)
> > Included patches: 1-1320
> > Compiled by watiko@cDesk
> > Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
> > ```
> 
> Simple verification method:
> $ vim -u NONE -c 'nnoremap <expr> x getchar()'
> 
> (1)
> type:
> x#:
> 
> Displayed to command-line:
> :.,.+34
> 
> 
> (2)
> type:
> x!:
> 
> Displayed to command-line:
> :.,.+32
> 
> Remarks:
> Character `#`'s ascii code is 35(dec).
> Character `!`'s ascii code is 33(dec).
> These are matched to displayed number + 1.
> 
> Thanks for reporting this.

Isn't this expected behavior?  getchar() returns a number, so typing
        x#:
Is equivalent to:
        34:

Perhaps you want:
        nnoremap <expr> x nr2char(getchar())

-- 
hundred-and-one symptoms of being an internet addict:
262. Your computer has it's own phone line - but your daughter doesn't.

 /// 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