]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - vim/patches/vim-7.3.020.patch0
Change file layout of the makefiles.
[people/amarx/ipfire-3.x.git] / vim / patches / vim-7.3.020.patch0
1 To: vim-dev@vim.org
2 Subject: Patch 7.3.020
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.020
11 Problem: Cursor position wrong when joining multiple lines and
12 'formatoptions' contains "a". (Moshe Kamensky)
13 Solution: Adjust cursor position for skipped indent. (Carlo Teubner)
14 Files: src/ops.c, src/testdir/test68.in, src/testdir/test68.ok
15
16
17 *** ../vim-7.3.019/src/ops.c 2010-08-15 21:57:28.000000000 +0200
18 --- src/ops.c 2010-10-09 17:00:35.000000000 +0200
19 ***************
20 *** 4153,4161 ****
21 int save_undo;
22 {
23 char_u *curr = NULL;
24 char_u *cend;
25 char_u *newp;
26 ! char_u *spaces; /* number of spaces inserte before a line */
27 int endcurr1 = NUL;
28 int endcurr2 = NUL;
29 int currsize = 0; /* size of the current line */
30 --- 4153,4162 ----
31 int save_undo;
32 {
33 char_u *curr = NULL;
34 + char_u *curr_start = NULL;
35 char_u *cend;
36 char_u *newp;
37 ! char_u *spaces; /* number of spaces inserted before a line */
38 int endcurr1 = NUL;
39 int endcurr2 = NUL;
40 int currsize = 0; /* size of the current line */
41 ***************
42 *** 4181,4187 ****
43 */
44 for (t = 0; t < count; ++t)
45 {
46 ! curr = ml_get((linenr_T)(curwin->w_cursor.lnum + t));
47 if (insert_space && t > 0)
48 {
49 curr = skipwhite(curr);
50 --- 4182,4188 ----
51 */
52 for (t = 0; t < count; ++t)
53 {
54 ! curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t));
55 if (insert_space && t > 0)
56 {
57 curr = skipwhite(curr);
58 ***************
59 *** 4265,4274 ****
60 copy_spaces(cend, (size_t)(spaces[t]));
61 }
62 mark_col_adjust(curwin->w_cursor.lnum + t, (colnr_T)0, (linenr_T)-t,
63 ! (long)(cend - newp + spaces[t]));
64 if (t == 0)
65 break;
66 ! curr = ml_get((linenr_T)(curwin->w_cursor.lnum + t - 1));
67 if (insert_space && t > 1)
68 curr = skipwhite(curr);
69 currsize = (int)STRLEN(curr);
70 --- 4266,4275 ----
71 copy_spaces(cend, (size_t)(spaces[t]));
72 }
73 mark_col_adjust(curwin->w_cursor.lnum + t, (colnr_T)0, (linenr_T)-t,
74 ! (long)(cend - newp + spaces[t] - (curr - curr_start)));
75 if (t == 0)
76 break;
77 ! curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t - 1));
78 if (insert_space && t > 1)
79 curr = skipwhite(curr);
80 currsize = (int)STRLEN(curr);
81 *** ../vim-7.3.019/src/testdir/test68.in 2010-08-15 21:57:29.000000000 +0200
82 --- src/testdir/test68.in 2010-10-09 16:53:02.000000000 +0200
83 ***************
84 *** 51,56 ****
85 --- 51,67 ----
86 }
87
88 STARTTEST
89 + /^{/+2
90 + :set tw& fo=a
91 + I^^\e
92 + ENDTEST
93 +
94 + {
95 + 1aa
96 + 2bb
97 + }
98 +
99 + STARTTEST
100 :g/^STARTTEST/.,/^ENDTEST/d
101 :1;/^Results/,$wq! test.out
102 ENDTEST
103 *** ../vim-7.3.019/src/testdir/test68.ok 2010-08-15 21:57:29.000000000 +0200
104 --- src/testdir/test68.ok 2010-10-09 16:53:02.000000000 +0200
105 ***************
106 *** 33,35 ****
107 --- 33,38 ----
108 #a b
109 }
110
111 +
112 + { 1aa ^^2bb }
113 +
114 *** ../vim-7.3.019/src/version.c 2010-09-30 21:03:13.000000000 +0200
115 --- src/version.c 2010-10-09 17:05:31.000000000 +0200
116 ***************
117 *** 716,717 ****
118 --- 716,719 ----
119 { /* Add new patch number below this line */
120 + /**/
121 + 20,
122 /**/
123
124 --
125 Did you hear about the new 3 million dollar West Virginia State Lottery?
126 The winner gets 3 dollars a year for a million years.
127
128 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
129 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
130 \\\ download, build and distribute -- http://www.A-A-P.org ///
131 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///