comparison src/map.c @ 30651:c6e85b9a88a0 v9.0.0660

patch 9.0.0660: mapping with CTRL keys does not work in the GUI Commit: https://github.com/vim/vim/commit/2cd0f27b75c4497bec872819a965b3d6b4d55030 Author: zeertzjq <zeertzjq@outlook.com> Date: Tue Oct 4 20:14:28 2022 +0100 patch 9.0.0660: mapping with CTRL keys does not work in the GUI Problem: Mapping with CTRL keys does not work in the GUI. Solution: Recognize CSI next to K_SPECIAL. (closes https://github.com/vim/vim/issues/11275, closes https://github.com/vim/vim/issues/11270)
author Bram Moolenaar <Bram@vim.org>
date Tue, 04 Oct 2022 21:15:03 +0200
parents 101f08b49ed3
children 93b603c24d23
comparison
equal deleted inserted replaced
30650:a0ef66456ec8 30651:c6e85b9a88a0
1751 if (res != NULL) 1751 if (res != NULL)
1752 { 1752 {
1753 d = res; 1753 d = res;
1754 for (s = p; *s != NUL; ) 1754 for (s = p; *s != NUL; )
1755 { 1755 {
1756 if (s[0] == K_SPECIAL && s[1] != NUL && s[2] != NUL) 1756 if ((s[0] == K_SPECIAL
1757 #ifdef FEAT_GUI
1758 || (gui.in_use && s[0] == CSI)
1759 #endif
1760 ) && s[1] != NUL && s[2] != NUL)
1757 { 1761 {
1758 // Copy special key unmodified. 1762 // Copy special key unmodified.
1759 *d++ = *s++; 1763 *d++ = *s++;
1760 *d++ = *s++; 1764 *d++ = *s++;
1761 *d++ = *s++; 1765 *d++ = *s++;