4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: "cit" used on <foo></foo> deletes <foo>. Should not delete
12 anything and start insertion, like "ci'" does on "". (Michal
14 Solution: Handle an empty object specifically. Made it work consistent for
19 *** ../vim-7.1.004/src/search.c Thu May 10 20:54:46 2007
20 --- src/search.c Mon Jun 4 12:31:04 2007
24 oap->start = start_pos;
25 oap->motion_type = MCHAR;
28 incl(&curwin->w_cursor);
29 ! oap->inclusive = FALSE;
32 oap->inclusive = TRUE;
38 oap->start = start_pos;
39 oap->motion_type = MCHAR;
40 + oap->inclusive = FALSE;
42 incl(&curwin->w_cursor);
43 ! else if (lt(start_pos, curwin->w_cursor))
44 ! /* Include the character under the cursor. */
45 oap->inclusive = TRUE;
47 + /* End is before the start (no text in between <>, [], etc.): don't
48 + * operate on any text. */
49 + curwin->w_cursor = start_pos;
56 if (in_html_tag(FALSE))
58 ! /* cursor on start tag, move to just after it */
59 while (*ml_get_cursor() != '>')
64 if (in_html_tag(FALSE))
66 ! /* cursor on start tag, move to its '>' */
67 while (*ml_get_cursor() != '>')
72 /* Exclude the start tag. */
73 curwin->w_cursor = start_pos;
74 while (inc_cursor() >= 0)
75 ! if (*ml_get_cursor() == '>' && lt(curwin->w_cursor, end_pos))
78 start_pos = curwin->w_cursor;
80 /* Exclude the start tag. */
81 curwin->w_cursor = start_pos;
82 while (inc_cursor() >= 0)
83 ! if (*ml_get_cursor() == '>')
86 start_pos = curwin->w_cursor;
93 ++curwin->w_cursor.col;
100 ! /* If the end is before the start there is no text between tags, select
101 ! * the char under the cursor. */
102 ! if (lt(end_pos, start_pos))
103 ! curwin->w_cursor = start_pos;
104 ! else if (*p_sel == 'e')
105 ++curwin->w_cursor.col;
111 oap->start = start_pos;
112 oap->motion_type = MCHAR;
113 ! oap->inclusive = TRUE;
119 oap->start = start_pos;
120 oap->motion_type = MCHAR;
121 ! if (lt(end_pos, start_pos))
123 ! /* End is before the start: there is no text between tags; operate
124 ! * on an empty area. */
125 ! curwin->w_cursor = start_pos;
126 ! oap->inclusive = FALSE;
129 ! oap->inclusive = TRUE;
133 *** ../vim-7.1.004/src/version.c Tue Jun 19 11:54:23 2007
134 --- src/version.c Tue Jun 19 12:57:03 2007
138 { /* Add new patch number below this line */
144 Life would be so much easier if we could just look at the source code.
146 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
147 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
148 \\\ download, build and distribute -- http://www.A-A-P.org ///
149 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///