This is fixing for a bug which vim.exe doesn't accept SHIFT-INSERT.
https://groups.google.com/forum/#!topic/vim_use/G1hB7FJbyAo/discussion
When patch 7.4.852 is included, combination of K_NUL & ANSI keys was not handled. And it was converted to unicode.
https://groups.google.com/forum/#!topic/vim_dev/Gu7pDIjS1UE/discussion
if (ch2 != NUL) { typeahead[typeaheadlen + n] = 3; typeahead[typeaheadlen + n + 1] = (char_u)ch2; n += 2; }
For example, following part use K_NUL & ANSI key to handle SHIFT-INSERT.
Lines 989 to 1013 in bdb8139
| for (i = sizeof(VirtKeyMap) / sizeof(VirtKeyMap[0]); --i >= 0; ) | |
| { | |
| if (VirtKeyMap[i].wVirtKey == pker->wVirtualKeyCode) | |
| { | |
| if (nModifs == 0) | |
| *pch = VirtKeyMap[i].chAlone; | |
| else if ((nModifs & SHIFT) != 0 && (nModifs & ~SHIFT) == 0) | |
| *pch = VirtKeyMap[i].chShift; | |
| else if ((nModifs & CTRL) != 0 && (nModifs & ~CTRL) == 0) | |
| *pch = VirtKeyMap[i].chCtrl; | |
| else if ((nModifs & ALT) != 0 && (nModifs & ~ALT) == 0) | |
| *pch = VirtKeyMap[i].chAlt; | |
| if (*pch != 0) | |
| { | |
| if (VirtKeyMap[i].fAnsiKey) | |
| { | |
| *pch2 = *pch; | |
| *pch = K_NUL; | |
| } | |
| return TRUE; | |
| } | |
| } | |
| } |
This change handle K_NUL in leading-character.
https://github.com/vim/vim/pull/2381
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
Merging #2381 into master will increase coverage by
<.01%.
The diff coverage isn/a.
@@ Coverage Diff @@ ## master #2381 +/- ## ========================================== + Coverage 74.52% 74.53% +<.01% ========================================== Files 91 91 Lines 132415 132416 +1 Branches 29083 29083 ========================================== + Hits 98686 98695 +9 + Misses 33700 33696 -4 + Partials 29 25 -4
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/gui_beval.c | 62.66% <0%> (-0.43%) |
⬇️ |
| src/gui.c | 47.45% <0%> (-0.21%) |
⬇️ |
| src/terminal.c | 64.85% <0%> (-0.07%) |
⬇️ |
| src/term.c | 50.72% <0%> (-0.06%) |
⬇️ |
| src/message.c | 68.67% <0%> (-0.05%) |
⬇️ |
| src/syntax.c | 77.51% <0%> (-0.03%) |
⬇️ |
| src/libvterm/src/screen.c | 72.79% <0%> (-0.03%) |
⬇️ |
| src/ex_docmd.c | 75.58% <0%> (+0.02%) |
⬆️ |
| src/os_unix.c | 54.28% <0%> (+0.04%) |
⬆️ |
| src/channel.c | 82.44% <0%> (+0.08%) |
⬆️ |
| ... and 3 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered by Codecov. Last update bdb8139...3a1aa51. Read the comment docs.
Sorry, this break something. For example, <up> key doesn't work.
@brammool This should not be merged since this PR is still wrong. As I mentioned in above, <Up> doesn't work.
Reopened #2381.
@mattn pushed 10 commits.
—
You are receiving this because you are subscribed to this thread.
Fixed. I checked this on vim.exe with utf-8 and cp932.