comparison src/message.c @ 33079:5f201b734cb7 v9.0.1826

patch 9.0.1826: keytrans() doesn't translate recorded key typed in a GUI Commit: https://github.com/vim/vim/commit/1bed993c01c4b5e4c6ab55e80e2410ba87de487c Author: zeertzjq <zeertzjq@outlook.com> Date: Wed Aug 30 19:38:24 2023 +0200 patch 9.0.1826: keytrans() doesn't translate recorded key typed in a GUI Problem: keytrans() doesn't translate recorded key typed in a GUI Solution: Handle CSI like K_SPECIAL, like in mb_unescape() closes: #12964 closes: #12966 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
author Christian Brabandt <cb@256bit.org>
date Wed, 30 Aug 2023 19:45:03 +0200
parents 4027cefc2aab
children e385bda5e345
comparison
equal deleted inserted replaced
33078:be72951df2eb 33079:5f201b734cb7
1840 if (p != NULL) 1840 if (p != NULL)
1841 return p; 1841 return p;
1842 } 1842 }
1843 1843
1844 c = *str; 1844 c = *str;
1845 if (c == K_SPECIAL && str[1] != NUL && str[2] != NUL) 1845 if ((c == K_SPECIAL
1846 #ifdef FEAT_GUI
1847 || c == CSI
1848 #endif
1849 ) && str[1] != NUL && str[2] != NUL)
1846 { 1850 {
1847 if (str[1] == KS_MODIFIER) 1851 if (str[1] == KS_MODIFIER)
1848 { 1852 {
1849 modifiers = str[2]; 1853 modifiers = str[2];
1850 str += 3; 1854 str += 3;
1851 c = *str; 1855 c = *str;
1852 } 1856 }
1853 if (c == K_SPECIAL && str[1] != NUL && str[2] != NUL) 1857 if ((c == K_SPECIAL
1858 #ifdef FEAT_GUI
1859 || c == CSI
1860 #endif
1861 ) && str[1] != NUL && str[2] != NUL)
1854 { 1862 {
1855 c = TO_SPECIAL(str[1], str[2]); 1863 c = TO_SPECIAL(str[1], str[2]);
1856 str += 2; 1864 str += 2;
1857 } 1865 }
1858 if (IS_SPECIAL(c) || modifiers) // special key 1866 if (IS_SPECIAL(c) || modifiers) // special key