Skip to content

<C-H> Mapping has stopped working in MacVim GUI, but still works in TUI #1370

@SirVer

Description

@SirVer

Steps to reproduce

  1. Open a file in TUI mode vim /tmp/blub.txt
  2. Ensure something is imapped to <c-h>.
  3. Typing <c-h> actually triggers this trigger
  4. :gui
  5. Now <c-h> is deleting the last character.

Expected behaviour

<c-h> should not be the same as <backspace>. I am aware that in traditional terminal emulators, there is no difference between <c-h> and <backspace>, however on another computer with an older mac VIM, this behaved differently: both the TUI and the GUI accept <c-h> as a mapping that is not interpreted as backspace. On my new computer (with Vim 9) and a recent macvim from homebrew, the TUI still accepts it, but not the GUI. Of note is that this happens most of the time, but sometimes the GUI also accepts <c-h>.

I made a screen capture to show the behavior, here <c-h> is mapped to https://github.com/SirVer/ultisnips expand command. You can see that it expands lorem<c-h> always in TUI mode, but only sometimes in GUI mode.

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 01 2021 08:32:44)
macOS version - x86_64
Included patches: 1-2681

Version of Vim and architecture

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Feb 07 2023 11:35:56) macOS version - arm64 Included patches: 1-1276 Compiled by Homebrew Huge version with MacVim GUI.

Environment

OS: Ventura, arm64
terminal: same behavior for iTerm2 & Terminal.app
TERM: xterm-256color
SHELL: zsh 5.8.1 (x86_64-apple-darwin22.0)

How MacVim was installed

homebrew

Logs and stack traces

-

Vim configuration where issue is reproducable

No response

Issue has been tested with given configuration

  • by running MacVim.app from GUI macOS interface
  • by running vim/gvim/etc installed by MacVim
  • by running other versions of vim (e.g. /usr/bin/vim)

Issue has been tested with no configuration

  • by running mvim --clean (or gvim, supplied by MacVim distribution)
  • by running vim --clean (in terminal, supplied by MacVim distribution)
  • by running vim --clean (in terminal, other suppliers, e.g. /usr/bin/vim)

Other conditions

  • The both Homebrew packages "vim" and "macvim" are installed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions