summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-07-09 20:51:07 +0200
committerBram Moolenaar <Bram@vim.org>2014-07-09 20:51:07 +0200
commit455009122a23050ef31c428df4155ad418b2e6fc (patch)
tree0679dd1fc50f4bb8e4b9a2dd7341e3f3e17d236d
parent1e1aca37841103a90ba773f14899ba3a3757cee2 (diff)
downloadvim-git-455009122a23050ef31c428df4155ad418b2e6fc.tar.gz
updated for version 7.4.363v7.4.363
Problem: In Windows console typing 0xCE does not work. Solution: Convert 0xCE to K_NUL 3. (Nobuhiro Takasaki et al.)
-rw-r--r--src/os_win32.c28
-rw-r--r--src/term.c13
-rw-r--r--src/version.c2
3 files changed, 39 insertions, 4 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index 09e5c610d..0c896efc3 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -619,7 +619,7 @@ win32_enable_privilege(LPTSTR lpszPrivilege, BOOL bEnable)
return FALSE;
}
- tokenPrivileges.PrivilegeCount = 1;
+ tokenPrivileges.PrivilegeCount = 1;
tokenPrivileges.Privileges[0].Luid = luid;
tokenPrivileges.Privileges[0].Attributes = bEnable ?
SE_PRIVILEGE_ENABLED : 0;
@@ -1785,13 +1785,14 @@ mch_inchar(
#endif
{
int n = 1;
+ int conv = FALSE;
- /* A key may have one or two bytes. */
typeahead[typeaheadlen] = c;
if (ch2 != NUL)
{
- typeahead[typeaheadlen + 1] = ch2;
- ++n;
+ typeahead[typeaheadlen + 1] = 3;
+ typeahead[typeaheadlen + 2] = ch2;
+ n += 2;
}
#ifdef FEAT_MBYTE
/* Only convert normal characters, not special keys. Need to
@@ -1800,6 +1801,7 @@ mch_inchar(
if (input_conv.vc_type != CONV_NONE
&& (ch2 == NUL || c != K_NUL))
{
+ conv = TRUE;
typeaheadlen -= unconverted;
n = convert_input_safe(typeahead + typeaheadlen,
n + unconverted, TYPEAHEADLEN - typeaheadlen,
@@ -1807,6 +1809,24 @@ mch_inchar(
}
#endif
+ if (conv)
+ {
+ char_u *p = typeahead + typeaheadlen;
+ char_u *e = typeahead + TYPEAHEADLEN;
+
+ while (*p && p < e)
+ {
+ if (*p == K_NUL)
+ {
+ ++p;
+ mch_memmove(p + 1, p, ((size_t)(e - p)) - 1);
+ *p = 3;
+ ++n;
+ }
+ ++p;
+ }
+ }
+
/* Use the ALT key to set the 8th bit of the character
* when it's one byte, the 8th bit isn't set yet and not
* using a double-byte encoding (would become a lead
diff --git a/src/term.c b/src/term.c
index 949b6fa4b..95c29ccf4 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3724,7 +3724,11 @@ add_termcode(name, string, flags)
return;
}
+#if defined(WIN3264) && !defined(FEAT_GUI)
+ s = vim_strnsave(string, (int)STRLEN(string) + 1);
+#else
s = vim_strsave(string);
+#endif
if (s == NULL)
return;
@@ -3734,6 +3738,15 @@ add_termcode(name, string, flags)
STRMOVE(s, s + 1);
s[0] = term_7to8bit(string);
}
+
+#if defined(WIN3264) && !defined(FEAT_GUI)
+ if (s[0] == K_NUL)
+ {
+ STRMOVE(s + 1, s);
+ s[1] = 3;
+ }
+#endif
+
len = (int)STRLEN(s);
need_gather = TRUE; /* need to fill termleader[] */
diff --git a/src/version.c b/src/version.c
index 232a2d083..150a950e7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -735,6 +735,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 363,
+/**/
362,
/**/
361,