]>
Commit | Line | Data |
---|---|---|
6577e359 | 1 | To: vim-dev@vim.org |
2 | Subject: patch 7.1.043 | |
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.1.043 | |
11 | Problem: In Ex mode using CTRL-D twice may cause a crash. Cursor isn't | |
12 | positioned properly after CTRL-D. | |
13 | Solution: Set prev_char properly. Position the cursor correctly. (Antony | |
14 | Scriven) | |
15 | Files: src/ex_getln.c | |
16 | ||
17 | ||
18 | *** ../vim-7.1.042/src/ex_getln.c Tue Jul 24 14:32:44 2007 | |
19 | --- src/ex_getln.c Wed Jul 25 20:57:05 2007 | |
20 | *************** | |
21 | *** 2095,2105 **** | |
22 | garray_T line_ga; | |
23 | char_u *pend; | |
24 | int startcol = 0; | |
25 | ! int c1; | |
26 | int escaped = FALSE; /* CTRL-V typed */ | |
27 | int vcol = 0; | |
28 | char_u *p; | |
29 | ! int prev_char = 0; | |
30 | ||
31 | /* Switch cursor on now. This avoids that it happens after the "\n", which | |
32 | * confuses the system function that computes tabstops. */ | |
33 | --- 2095,2105 ---- | |
34 | garray_T line_ga; | |
35 | char_u *pend; | |
36 | int startcol = 0; | |
37 | ! int c1 = 0; | |
38 | int escaped = FALSE; /* CTRL-V typed */ | |
39 | int vcol = 0; | |
40 | char_u *p; | |
41 | ! int prev_char; | |
42 | ||
43 | /* Switch cursor on now. This avoids that it happens after the "\n", which | |
44 | * confuses the system function that computes tabstops. */ | |
45 | *************** | |
46 | *** 2152,2157 **** | |
47 | --- 2152,2158 ---- | |
48 | ||
49 | /* Get one character at a time. Don't use inchar(), it can't handle | |
50 | * special characters. */ | |
51 | + prev_char = c1; | |
52 | c1 = vgetc(); | |
53 | ||
54 | /* | |
55 | *************** | |
56 | *** 2209,2215 **** | |
57 | redraw: | |
58 | /* redraw the line */ | |
59 | msg_col = startcol; | |
60 | - windgoto(msg_row, msg_col); | |
61 | vcol = 0; | |
62 | for (p = (char_u *)line_ga.ga_data; | |
63 | p < (char_u *)line_ga.ga_data + line_ga.ga_len; ++p) | |
64 | --- 2210,2215 ---- | |
65 | *************** | |
66 | *** 2228,2233 **** | |
67 | --- 2228,2234 ---- | |
68 | } | |
69 | } | |
70 | msg_clr_eos(); | |
71 | + windgoto(msg_row, msg_col); | |
72 | continue; | |
73 | } | |
74 | ||
75 | *************** | |
76 | *** 2273,2279 **** | |
77 | if (IS_SPECIAL(c1)) | |
78 | c1 = '?'; | |
79 | ((char_u *)line_ga.ga_data)[line_ga.ga_len] = c1; | |
80 | - prev_char = c1; | |
81 | if (c1 == '\n') | |
82 | msg_putchar('\n'); | |
83 | else if (c1 == TAB) | |
84 | --- 2274,2279 ---- | |
85 | *** ../vim-7.1.042/src/version.c Fri Jul 27 21:32:13 2007 | |
86 | --- src/version.c Sat Jul 28 14:19:37 2007 | |
87 | *************** | |
88 | *** 668,669 **** | |
89 | --- 668,671 ---- | |
90 | { /* Add new patch number below this line */ | |
91 | + /**/ | |
92 | + 43, | |
93 | /**/ | |
94 | ||
95 | -- | |
96 | hundred-and-one symptoms of being an internet addict: | |
97 | 48. You get a tatoo that says "This body best viewed with Netscape 3.1 or | |
98 | higher." | |
99 | ||
100 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
101 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
102 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
103 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |