4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
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.
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
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);
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);
49 + && lnum == wp->w_cursor.lnum
50 && (colnr_T)vcol == wp->w_virtcol)))
55 * preedit_changed and commit. Thus Vim can't set "im_is_active", use
56 * im_is_preediting() here. */
58 ! && lnum == curwin->w_cursor.lnum
63 * preedit_changed and commit. Thus Vim can't set "im_is_active", use
64 * im_is_preediting() here. */
66 ! && lnum == wp->w_cursor.lnum
74 if (preedit_end_col == MAXCOL)
75 ! getvcol(curwin, &(curwin->w_cursor), &tcol, NULL, NULL);
77 tcol = preedit_end_col;
78 if ((long)preedit_start_col <= vcol && vcol < (long)tcol)
82 if (preedit_end_col == MAXCOL)
83 ! getvcol(curwin, &(wp->w_cursor), &tcol, NULL, NULL);
85 tcol = preedit_end_col;
86 if ((long)preedit_start_col <= vcol && vcol < (long)tcol)
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
99 if (lcs_eol == lcs_eol_one
100 ! && ((area_attr != 0 && vcol == fromcol
102 ! && (VIsual_mode != Ctrl_V
103 ! || lnum == VIsual.lnum
104 ! || lnum == curwin->w_cursor.lnum)
107 #ifdef FEAT_SEARCH_EXTRA
108 /* highlight 'hlsearch' match at end of line */
109 || (prevcol_hl_flag == TRUE
115 ! if (eol_hl_off > 0 && vcol - eol_hl_off == (long)wp->w_virtcol)
117 /* highlight last char after line */
123 ! if (eol_hl_off > 0 && vcol - eol_hl_off == (long)wp->w_virtcol
124 ! && lnum == wp->w_cursor.lnum)
126 /* highlight last char after line */
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
133 { /* Add new patch number below this line */
139 hundred-and-one symptoms of being an internet addict:
140 239. You think "surfing" is something you do on dry land.
142 /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///