Yukihiro Nakadaira wrote:
> `:help getcharmod()` is not correct.
> Result was changed by v7-0055.
> And mouse double, triple and quadruple do not have individual bit.
> Actual result is
>
> 2 shift
> 4 control
> 8 alt
> 16 meta (when it's different from ALT)
> 32 mouse double click
> 64 mouse triple click
> 96 mouse quadruple click
> 128 Macintosh only: command
Thanks for the correction!
> Two bits are used for mouse.
> 0b00100000 = double
> 0b01000000 = triple
> 0b01100000 = quadruple
>
> Dictionary version should behave as following.
>
> function! Getcharmoddict()
> let mod = getcharmod()
> return {
> \ 'shift': mod / 2 % 2,
> \ 'control': mod / 4 % 2,
> \ 'alt': mod / 8 % 2,
> \ 'meta': mod / 16 % 2,
> \ 'mousedouble': mod / 32 % 4 == 1,
> \ 'mousetriple': mod / 32 % 4 == 2,
> \ 'mousequad': mod / 32 % 4 == 3,
> \ 'command': mod / 128 % 2,
> \ }
> endfunction
Yep.
--
hundred-and-one symptoms of being an internet addict:
235. You start naming your kids Pascal, COBOL, Algol and Fortran.
/// 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