]> git.pld-linux.org Git - packages/vim.git/blob - 7.1.243
- typo
[packages/vim.git] / 7.1.243
1 To: vim-dev@vim.org
2 Subject: Patch 7.1.243
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.243 (after 7.1.240)
11 Problem:    "U" doesn't work on all text in Visual mode. (Adri Verhoef)
12 Solution:   Loop over all the lines to be changed.  Add tests for this.
13 Files:      src/ops.c, src/testdir/test39.in, src/testdir/test39.ok
14
15
16 *** ../vim-7.1.242/src/ops.c    Tue Jan 22 16:01:25 2008
17 --- src/ops.c   Mon Feb  4 22:23:22 2008
18 ***************
19 *** 2197,2203 ****
20   #ifdef FEAT_VISUAL
21       struct block_def  bd;
22   #endif
23 !     int                       did_change;
24   
25       if (u_save((linenr_T)(oap->start.lnum - 1),
26                                        (linenr_T)(oap->end.lnum + 1)) == FAIL)
27 --- 2197,2203 ----
28   #ifdef FEAT_VISUAL
29       struct block_def  bd;
30   #endif
31 !     int                       did_change = FALSE;
32   
33       if (u_save((linenr_T)(oap->start.lnum - 1),
34                                        (linenr_T)(oap->end.lnum + 1)) == FAIL)
35 ***************
36 *** 2242,2248 ****
37         else if (!oap->inclusive)
38             dec(&(oap->end));
39   
40 !       did_change = swapchars(oap->op_type, &pos, oap->end.col - pos.col + 1);
41         if (did_change)
42         {
43             changed_lines(oap->start.lnum, oap->start.col, oap->end.lnum + 1,
44 --- 2242,2259 ----
45         else if (!oap->inclusive)
46             dec(&(oap->end));
47   
48 !       if (pos.lnum == oap->end.lnum)
49 !           did_change = swapchars(oap->op_type, &pos,
50 !                                                 oap->end.col - pos.col + 1);
51 !       else
52 !           for (;;)
53 !           {
54 !               did_change |= swapchars(oap->op_type, &pos,
55 !                               pos.lnum == oap->end.lnum ? oap->end.col + 1:
56 !                                          (int)STRLEN(ml_get_pos(&pos)));
57 !               if (ltoreq(oap->end, pos) || inc(&pos) == -1)
58 !                   break;
59 !           }
60         if (did_change)
61         {
62             changed_lines(oap->start.lnum, oap->start.col, oap->end.lnum + 1,
63 ***************
64 *** 2314,2330 ****
65       for (todo = length; todo > 0; --todo)
66       {
67   # ifdef FEAT_MBYTE
68 -       int pos_col = pos->col;
69
70         if (has_mbyte)
71             /* we're counting bytes, not characters */
72             todo -= (*mb_ptr2len)(ml_get_pos(pos)) - 1;
73   # endif
74         did_change |= swapchar(op_type, pos);
75 - # ifdef FEAT_MBYTE
76 -       /* Changing German sharp s to SS increases the column. */
77 -       todo += pos->col - pos_col;
78 - # endif
79         if (inc(pos) == -1)    /* at end of file */
80             break;
81       }
82 --- 2325,2335 ----
83 *** ../vim-7.1.242/src/testdir/test39.in        Sun Jun 13 18:21:09 2004
84 --- src/testdir/test39.in       Wed Feb  6 13:57:37 2008
85 ***************
86 *** 1,8 ****
87 --- 1,10 ----
88   
89   Test Visual block mode commands
90 + And test "U" in Visual mode, also on German sharp S.
91   
92   STARTTEST
93   :so small.vim
94 + :so mbyte.vim
95   /^abcde
96   :" Test shift-right of a block
97   jllll\16jj>wll\16jlll>
98 ***************
99 *** 14,20 ****
100   Gllll\16kkklllrq
101   :" Test block-change
102   G$khhh\16hhkkcmno\e
103 ! :$-4,$wq! test.out
104   ENDTEST
105   
106   abcdefghijklm
107 --- 16,37 ----
108   Gllll\16kkklllrq
109   :" Test block-change
110   G$khhh\16hhkkcmno\e
111 ! :$-4,$w! test.out
112 ! :" gUe must uppercase a whole word, also when ß changes to SS
113 ! Gothe youtußeuu end\eYpk0wgUe
114 ! :" gUfx must uppercase until x, inclusive.
115 ! O- youßtußexu -\e0fogUfx
116 ! :" VU must uppercase a whole line
117 ! YpkVU
118 ! :" same, when it's the last line in the buffer
119 ! YPGi111\eVUddP
120 ! :" Uppercase two lines
121 ! Oblah di
122 ! doh dut\eVkUj
123 ! :" Uppercase part of two lines
124 ! ddppi333\ek0i222\efyllvjfuUk
125 ! :/^the/,$w >> test.out
126 ! :qa!
127   ENDTEST
128   
129   abcdefghijklm
130 *** ../vim-7.1.242/src/testdir/test39.ok        Sun Jun 13 18:59:28 2004
131 --- src/testdir/test39.ok       Tue Feb  5 22:25:38 2008
132 ***************
133 *** 3,5 ****
134 --- 3,13 ----
135   axyzqqqqef mno        ghijklm
136   axyzqqqqefgmnoklm
137   abcdqqqqijklm
138 + the YOUTUSSEUU end
139 + - yOUSSTUSSEXu -
140 + THE YOUTUSSEUU END
141 + 111THE YOUTUSSEUU END
142 + BLAH DI
143 + DOH DUT
144 + 222the yoUTUSSEUU END
145 + 333THE YOUTUßeuu end
146 *** ../vim-7.1.242/src/version.c        Sat Jan 26 21:15:00 2008
147 --- src/version.c       Wed Feb  6 14:41:00 2008
148 ***************
149 *** 668,669 ****
150 --- 668,671 ----
151   {   /* Add new patch number below this line */
152 + /**/
153 +     243,
154   /**/
155
156 -- 
157 It's totally unfair to suggest - as many have - that engineers are socially
158 inept.  Engineers simply have different objectives when it comes to social
159 interaction.
160                                 (Scott Adams - The Dilbert principle)
161
162  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
163 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
164 \\\        download, build and distribute -- http://www.A-A-P.org        ///
165  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.042689 seconds and 3 git commands to generate.