[vim/vim] CTRL-B mapping ignored at the hit-enter prompt when modifyOtherKeys is enabled (#6158)

8 views
Skip to first unread message

lacygoill

unread,
May 29, 2020, 2:20:32 PM5/29/20
to vim/vim, Subscribed

Describe the bug

A mapping using the control modifier is ignored at the hit-enter prompt when modifyOtherKeys is enabled.

To Reproduce

Start an xterm terminal, and run this shell command:

vim -Nu NONE +'nno <c-b> :echom "C-b was pressed"<cr>' +hi

Press C-b: no message is printed on the command-line, nor logged in the output of :messages.

Expected behavior

"C-b was pressed" is printed on the command-line, and logged in the output of :messages.

Environment

  • Vim version: 8.2 Included patches: 1-836
  • OS: Ubuntu 16.04.6 LTS
  • Terminal: XTerm(322)

Additional context

The issue disappears if the modifyOtherKeys feature is disabled.

vim -Nu NONE --cmd 'let [&t_TI, &t_TE] = ["", ""]' +'nno <c-b> :echom "C-b was pressed"<cr>' +hi
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Bram Moolenaar

unread,
May 29, 2020, 3:03:29 PM5/29/20
to vim/vim, Subscribed

I cannot reproduce the problem, it works with and without modifyOtherKeys enabled.

lacygoill

unread,
May 29, 2020, 3:15:44 PM5/29/20
to vim/vim, Subscribed

I'm on the latest commit (8.2.0836), and I can reproduce without:

  • any Vim config (-Nu NONE)
  • any shell config (bash --norc --noprofile)
  • any terminal config (commented the whole ~/.Xresources)
  • any special option during the compilation, except --with-features=huge (./configure --with-features=huge)

Here is a gif when modifyOtherKeys is enabled:

gif

And here is a gif when modifyOtherKeys is disabled:

gif

lacygoill

unread,
May 29, 2020, 3:29:37 PM5/29/20
to vim/vim, Subscribed

Another thing that I've just noticed. The mapping works if <c-b> is replaced with a literal C-b character (obtained after pressing C-v C-b).

I guess the issue is somehow linked to what you said here about the fact that a <C-b> mapping exists in two forms; a simplified one and a non-simplified one. It seems that the non-simplified form doesn't work at the hit-enter prompt.

Bram Moolenaar

unread,
May 29, 2020, 4:10:54 PM5/29/20
to vim/vim, Subscribed

Ah, I missed the part about this being at the hit enter prompt. Hmm, I suppose much more must have already been failing there.

Bram Moolenaar

unread,
May 29, 2020, 4:42:30 PM5/29/20
to vim/vim, Subscribed

Closed #6158 via b42c0d5.

Reply all
Reply to author
Forward
0 new messages