You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gvim -Nu NONE +'map x –'
:map x
x ?
:echo execute('map x')
x ^S
Are you able to display the same Unicode character in the same xterm when Vim is not running?
Yes:
$ printf -- '–'
–
What is 'encoding' set to? In particular, is it set to utf-8 ? And if it is, does your vimrc set that value before defining the mapping?
'encoding' is set with its default value which is utf-8.
I don't know when Vim sets the option, but I don't set it manually when I start Vim with -Nu NONE.
I can reproduce even if I run map x – later:
vim -Nu NONE
:map x –
:map x
x
:echo execute('map x')
x ^S
If you define that mapping in your vimrc, does that vimrc include near the top the line
scriptencoding utf-8
No, but I have this line in my vimrc before installing mappings:
set encoding=utf-8
But I can reproduce even without any config.
In the shell from which you start Vim, what are $LC_ALL, $LC_CTYPE and $LANG set to (and which of them are unset)?
LC_ALL and LANG are both set to en_US.UTF-8. LC_CTYPE is unset.
Describe the bug
The output of
:map x
may be wrong when the rhs of thex
mapping contains a multibyte character.To Reproduce
Run this shell command:
Then, run this Ex command:
The output is:
Expected behavior
The output is:
Environment
Additional context
With
execute()
(or:redir
), the output is different (but still wrong):This time, Vim prints the caret notation of the
C-s
character.I can reproduce the issue with an abbreviation too:
The text was updated successfully, but these errors were encountered: