]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.0343: 'showcmd' wrong for partial mapping with multibyte v9.1.0343
authorzeertzjq <zeertzjq@outlook.com>
Wed, 17 Apr 2024 19:28:54 +0000 (21:28 +0200)
committerChristian Brabandt <cb@256bit.org>
Wed, 17 Apr 2024 19:28:54 +0000 (21:28 +0200)
commitacdfb8a97995e0f81832207e39564ba795281108
tree43ac60dc7ab26bc680c9949af1dfca66a73731e5
parentae7e61c928b4adaa220e59ecebc75ef630674207
patch 9.1.0343: 'showcmd' wrong for partial mapping with multibyte

Problem:  'showcmd' is wrong for partial mapping with multibyte char,
          and isn't very readable with modifyOtherKeys.
Solution: Decode multibyte char and merge modifiers into the char.
          (zeertzjq)

This improves the following situations:
- Multibyte chars whose individual bytes are considered unprintable are
  now shown properly in 'showcmd' area.
- Ctrl-W with modifyOtherKeys now shows ^W in 'showcmd' area.

The following situation may still need improvement:
- If the char is a special key or has modifiers that cannot be merged
  into it, internal keycodes are shown in 'showcmd' area like before.
  This applies to keys typed in Normal mode commands as well, and it's
  hard to decide how to make it more readable due to the limited space
  taken by 'showcmd', so I'll leave it for later.

closes: #14572

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/getchar.c
src/normal.c
src/testdir/test_mapping.vim
src/version.c