]> git.ipfire.org Git - ipfire-3.x.git/blob - vim/patches/vim-7.3.406.patch0
python3: Update to 3.6.3
[ipfire-3.x.git] / vim / patches / vim-7.3.406.patch0
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.406
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.3.406
11 Problem: Multi-byte characters in b:browsefilter are not handled correctly.
12 Solution: First use convert_filter() normally and then convert to wide
13 characters. (Taro Muraoka)
14 Files: src/gui_w48.c
15
16
17 *** ../vim-7.3.405/src/gui_w48.c 2011-09-07 18:58:24.000000000 +0200
18 --- src/gui_w48.c 2012-01-20 17:54:19.000000000 +0100
19 ***************
20 *** 328,333 ****
21 --- 328,337 ----
22 static LRESULT _OnImeNotify(HWND hWnd, DWORD dwCommand, DWORD dwData);
23 #endif
24
25 + #if defined(FEAT_MBYTE) && defined(WIN3264)
26 + static char_u *convert_filter(char_u *s);
27 + #endif
28 +
29 #ifdef DEBUG_PRINT_ERROR
30 /*
31 * Print out the last Windows error message
32 ***************
33 *** 3275,3302 ****
34
35 # if defined(FEAT_MBYTE) && defined(WIN3264)
36 /*
37 ! * Wide version of convert_filter(). Keep in sync!
38 */
39 static WCHAR *
40 convert_filterW(char_u *s)
41 {
42 ! WCHAR *res;
43 ! unsigned s_len = (unsigned)STRLEN(s);
44 ! unsigned i;
45
46 ! res = (WCHAR *)alloc((s_len + 3) * sizeof(WCHAR));
47 ! if (res != NULL)
48 ! {
49 ! for (i = 0; i < s_len; ++i)
50 ! if (s[i] == '\t' || s[i] == '\n')
51 ! res[i] = '\0';
52 ! else
53 ! res[i] = s[i];
54 ! res[s_len] = NUL;
55 ! /* Add two extra NULs to make sure it's properly terminated. */
56 ! res[s_len + 1] = NUL;
57 ! res[s_len + 2] = NUL;
58 ! }
59 return res;
60 }
61
62 --- 3279,3298 ----
63
64 # if defined(FEAT_MBYTE) && defined(WIN3264)
65 /*
66 ! * Wide version of convert_filter().
67 */
68 static WCHAR *
69 convert_filterW(char_u *s)
70 {
71 ! char_u *tmp;
72 ! int len;
73
74 ! tmp = convert_filter(s);
75 ! if (tmp == NULL)
76 ! return NULL;
77 ! len = (int)STRLEN(s) + 3;
78 ! res = enc_to_utf16(tmp, &len);
79 ! vim_free(tmp);
80 return res;
81 }
82
83 *** ../vim-7.3.405/src/version.c 2012-01-20 17:15:47.000000000 +0100
84 --- src/version.c 2012-01-20 17:57:09.000000000 +0100
85 ***************
86 *** 716,717 ****
87 --- 716,719 ----
88 { /* Add new patch number below this line */
89 + /**/
90 + 406,
91 /**/
92
93 --
94 DENNIS: Look, strange women lying on their backs in ponds handing out
95 swords ... that's no basis for a system of government. Supreme
96 executive power derives from a mandate from the masses, not from some
97 farcical aquatic ceremony.
98 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
99
100 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
101 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
102 \\\ an exciting new programming language -- http://www.Zimbu.org ///
103 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///