]>
Commit | Line | Data |
---|---|---|
9b1d76b7 AG |
1 | To: vim-dev@vim.org |
2 | Subject: patch 7.0.207 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.0.207 | |
11 | Problem: After patch 2.0.203 CSI and K_SPECIAL characters are escaped when | |
12 | recorded and then again when the register is executed. | |
13 | Solution: Remove escaping before putting the recorded characters in a | |
14 | register. (Yukihiro Nakadaira) | |
15 | Files: src/getchar.c, src/ops.c, src/proto/getchar.pro | |
16 | ||
17 | ||
18 | *** ../vim-7.0.206/src/getchar.c Tue Feb 27 23:06:44 2007 | |
19 | --- src/getchar.c Sun Mar 4 21:19:50 2007 | |
20 | *************** | |
21 | *** 4438,4443 **** | |
22 | --- 4442,4476 ---- | |
23 | *d = NUL; | |
24 | } | |
25 | return res; | |
26 | + } | |
27 | + | |
28 | + /* | |
29 | + * Remove escaping from CSI and K_SPECIAL characters. Reverse of | |
30 | + * vim_strsave_escape_csi(). Works in-place. | |
31 | + */ | |
32 | + void | |
33 | + vim_unescape_csi(p) | |
34 | + char_u *p; | |
35 | + { | |
36 | + char_u *s = p, *d = p; | |
37 | + | |
38 | + while (*s != NUL) | |
39 | + { | |
40 | + if (s[0] == K_SPECIAL && s[1] == KS_SPECIAL && s[2] == KE_FILLER) | |
41 | + { | |
42 | + *d++ = K_SPECIAL; | |
43 | + s += 3; | |
44 | + } | |
45 | + else if ((s[0] == K_SPECIAL || s[0] == CSI) | |
46 | + && s[1] == KS_EXTRA && s[2] == (int)KE_CSI) | |
47 | + { | |
48 | + *d++ = CSI; | |
49 | + s += 3; | |
50 | + } | |
51 | + else | |
52 | + *d++ = *s++; | |
53 | + } | |
54 | + *d = NUL; | |
55 | } | |
56 | ||
57 | /* | |
58 | *** ../vim-7.0.206/src/ops.c Tue Feb 27 17:25:28 2007 | |
59 | --- src/ops.c Sun Mar 4 21:23:47 2007 | |
60 | *************** | |
61 | *** 1042,1047 **** | |
62 | --- 1042,1050 ---- | |
63 | retval = FAIL; | |
64 | else | |
65 | { | |
66 | + /* Remove escaping for CSI and K_SPECIAL in multi-byte chars. */ | |
67 | + vim_unescape_csi(p); | |
68 | + | |
69 | /* | |
70 | * We don't want to change the default register here, so save and | |
71 | * restore the current register name. | |
72 | *** ../vim-7.0.206/src/proto/getchar.pro Sun Apr 30 20:38:15 2006 | |
73 | --- src/proto/getchar.pro Sun Mar 4 21:19:41 2007 | |
74 | *************** | |
75 | *** 56,61 **** | |
76 | --- 56,62 ---- | |
77 | extern int ExpandMappings __ARGS((regmatch_T *regmatch, int *num_file, char_u ***file)); | |
78 | extern int check_abbr __ARGS((int c, char_u *ptr, int col, int mincol)); | |
79 | extern char_u *vim_strsave_escape_csi __ARGS((char_u *p)); | |
80 | + extern void vim_unescape_csi __ARGS((char_u *p)); | |
81 | extern int makemap __ARGS((FILE *fd, buf_T *buf)); | |
82 | extern int put_escstr __ARGS((FILE *fd, char_u *strstart, int what)); | |
83 | extern void check_map_keycodes __ARGS((void)); | |
84 | *** ../vim-7.0.206/src/version.c Fri Mar 2 20:00:06 2007 | |
85 | --- src/version.c Sun Mar 4 21:24:26 2007 | |
86 | *************** | |
87 | *** 668,669 **** | |
88 | --- 668,671 ---- | |
89 | { /* Add new patch number below this line */ | |
90 | + /**/ | |
91 | + 207, | |
92 | /**/ | |
93 | ||
94 | -- | |
95 | hundred-and-one symptoms of being an internet addict: | |
96 | 251. You've never seen your closest friends who usually live WAY too far away. | |
97 | ||
98 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
99 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
100 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
101 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |