|
1 To: [email protected] |
|
2 Subject: Patch 7.2.148 |
|
3 Fcc: outbox |
|
4 From: Bram Moolenaar <[email protected]> |
|
5 Mime-Version: 1.0 |
|
6 Content-Type: text/plain; charset=ISO-8859-1 |
|
7 Content-Transfer-Encoding: 8bit |
|
8 ------------ |
|
9 |
|
10 Patch 7.2.148 |
|
11 Problem: When searching for "$" while 'hlsearch' is set, highlighting the |
|
12 character after the line does not work in the cursor column. |
|
13 Also highlighting for Visual mode after the line end when this |
|
14 isn't needed. (Markus Heidelberg) |
|
15 Solution: Only compare the cursor column in the cursor line. Only highlight |
|
16 for Visual selection after the last character when it's needed to |
|
17 see where the Visual selection ends. |
|
18 Files: src/screen.c |
|
19 |
|
20 |
|
21 *** ../vim-7.2.147/src/screen.c Wed Mar 18 16:26:31 2009 |
|
22 --- src/screen.c Wed Mar 18 17:24:56 2009 |
|
23 *************** |
|
24 *** 2889,2896 **** |
|
25 } |
|
26 else |
|
27 tocol = MAXCOL; |
|
28 ! if (fromcol == tocol) /* do at least one character */ |
|
29 ! tocol = fromcol + 1; /* happens when past end of line */ |
|
30 area_highlighting = TRUE; |
|
31 attr = hl_attr(HLF_I); |
|
32 } |
|
33 --- 2889,2897 ---- |
|
34 } |
|
35 else |
|
36 tocol = MAXCOL; |
|
37 ! /* do at least one character; happens when past end of line */ |
|
38 ! if (fromcol == tocol) |
|
39 ! tocol = fromcol + 1; |
|
40 area_highlighting = TRUE; |
|
41 attr = hl_attr(HLF_I); |
|
42 } |
|
43 *************** |
|
44 *** 4118,4123 **** |
|
45 --- 4119,4125 ---- |
|
46 # endif |
|
47 (col < W_WIDTH(wp))) |
|
48 && !(noinvcur |
|
49 + && lnum == wp->w_cursor.lnum |
|
50 && (colnr_T)vcol == wp->w_virtcol))) |
|
51 && lcs_eol_one >= 0) |
|
52 { |
|
53 *************** |
|
54 *** 4259,4265 **** |
|
55 * preedit_changed and commit. Thus Vim can't set "im_is_active", use |
|
56 * im_is_preediting() here. */ |
|
57 if (xic != NULL |
|
58 ! && lnum == curwin->w_cursor.lnum |
|
59 && (State & INSERT) |
|
60 && !p_imdisable |
|
61 && im_is_preediting() |
|
62 --- 4261,4267 ---- |
|
63 * preedit_changed and commit. Thus Vim can't set "im_is_active", use |
|
64 * im_is_preediting() here. */ |
|
65 if (xic != NULL |
|
66 ! && lnum == wp->w_cursor.lnum |
|
67 && (State & INSERT) |
|
68 && !p_imdisable |
|
69 && im_is_preediting() |
|
70 *************** |
|
71 *** 4268,4274 **** |
|
72 colnr_T tcol; |
|
73 |
|
74 if (preedit_end_col == MAXCOL) |
|
75 ! getvcol(curwin, &(curwin->w_cursor), &tcol, NULL, NULL); |
|
76 else |
|
77 tcol = preedit_end_col; |
|
78 if ((long)preedit_start_col <= vcol && vcol < (long)tcol) |
|
79 --- 4270,4276 ---- |
|
80 colnr_T tcol; |
|
81 |
|
82 if (preedit_end_col == MAXCOL) |
|
83 ! getvcol(curwin, &(wp->w_cursor), &tcol, NULL, NULL); |
|
84 else |
|
85 tcol = preedit_end_col; |
|
86 if ((long)preedit_start_col <= vcol && vcol < (long)tcol) |
|
87 *************** |
|
88 *** 4365,4371 **** |
|
89 } |
|
90 #endif |
|
91 if (lcs_eol == lcs_eol_one |
|
92 ! && ((area_attr != 0 && vcol == fromcol && c == NUL) |
|
93 #ifdef FEAT_SEARCH_EXTRA |
|
94 /* highlight 'hlsearch' match at end of line */ |
|
95 || (prevcol_hl_flag == TRUE |
|
96 --- 4367,4379 ---- |
|
97 } |
|
98 #endif |
|
99 if (lcs_eol == lcs_eol_one |
|
100 ! && ((area_attr != 0 && vcol == fromcol |
|
101 ! #ifdef FEAT_VISUAL |
|
102 ! && (VIsual_mode != Ctrl_V |
|
103 ! || lnum == VIsual.lnum |
|
104 ! || lnum == curwin->w_cursor.lnum) |
|
105 ! #endif |
|
106 ! && c == NUL) |
|
107 #ifdef FEAT_SEARCH_EXTRA |
|
108 /* highlight 'hlsearch' match at end of line */ |
|
109 || (prevcol_hl_flag == TRUE |
|
110 *************** |
|
111 *** 4459,4465 **** |
|
112 if (c == NUL) |
|
113 { |
|
114 #ifdef FEAT_SYN_HL |
|
115 ! if (eol_hl_off > 0 && vcol - eol_hl_off == (long)wp->w_virtcol) |
|
116 { |
|
117 /* highlight last char after line */ |
|
118 --col; |
|
119 --- 4467,4474 ---- |
|
120 if (c == NUL) |
|
121 { |
|
122 #ifdef FEAT_SYN_HL |
|
123 ! if (eol_hl_off > 0 && vcol - eol_hl_off == (long)wp->w_virtcol |
|
124 ! && lnum == wp->w_cursor.lnum) |
|
125 { |
|
126 /* highlight last char after line */ |
|
127 --col; |
|
128 *** ../vim-7.2.147/src/version.c Wed Mar 18 16:26:31 2009 |
|
129 --- src/version.c Wed Mar 18 19:05:37 2009 |
|
130 *************** |
|
131 *** 678,679 **** |
|
132 --- 678,681 ---- |
|
133 { /* Add new patch number below this line */ |
|
134 + /**/ |
|
135 + 148, |
|
136 /**/ |
|
137 |
|
138 -- |
|
139 hundred-and-one symptoms of being an internet addict: |
|
140 239. You think "surfing" is something you do on dry land. |
|
141 |
|
142 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ |
|
143 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
|
144 \\\ download, build and distribute -- http://www.A-A-P.org /// |
|
145 \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |