Closed AchmadFathoni closed 2 years ago
Successfully reproduced this bug, don't know the cause yet.
<C-n>
is also work. Maybe arbitrary ctrl button combination is not the cause.
This is a limitation of vim.
<C-m>
seems to be the same as <CR>
, so that mapping is effectively the same as:
nnoremap <CR> :MundoToggle<CR>
Notice how highlighting a node and doing C-m
results in mundo loading that state -- just like it would for CR.
Also see how vim's :help CTRL-M
(and c and i variants) all show C-m and CR bound to the same commands. (I don't know why vim allows you to bind different things to them. Maybe it's a limitation of vim's input system on most platforms. Even gvim has this problem!) You should see similar issues with C-i (tab) and C-h (backspace).
Confirmed that "control + m" has same input code with "enter", closing this issue since it's not an issue of vim-mundo.
Using neovim 0.4.4 with this init.vim
When mundo graph is hidden and I press the Ctrl+m, mundo graph is able to appear and my cursor is inside it. If I press Ctrl+m again, nothing happen(I expect the mundo graph to hide). To successfully hide the mundo graph, I must move my cursor to the opened file buffer and then hit Ctrl+m.
This behavior is absent when use F2 as
:MundoToggle
shortcut.