|
Karsten Hopp |
2b3c15 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
2b3c15 |
Subject: Patch 7.1.152
|
|
Karsten Hopp |
2b3c15 |
Fcc: outbox
|
|
Karsten Hopp |
2b3c15 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
2b3c15 |
Mime-Version: 1.0
|
|
Karsten Hopp |
2b3c15 |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
2b3c15 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
2b3c15 |
------------
|
|
Karsten Hopp |
2b3c15 |
|
|
Karsten Hopp |
2b3c15 |
Patch 7.1.152
|
|
Karsten Hopp |
2b3c15 |
Problem: Display problem when 'hls' and 'cursorcolumn' are set and
|
|
Karsten Hopp |
2b3c15 |
searching for "$". (John Mullin) Also when scrolling
|
|
Karsten Hopp |
2b3c15 |
horizontally when 'wrap' is off.
|
|
Karsten Hopp |
2b3c15 |
Solution: Keep track of the column where highlighting was set. Check the
|
|
Karsten Hopp |
2b3c15 |
column offset when skipping characters.
|
|
Karsten Hopp |
2b3c15 |
Files: src/screen.c
|
|
Karsten Hopp |
2b3c15 |
|
|
Karsten Hopp |
2b3c15 |
|
|
Karsten Hopp |
2b3c15 |
*** ../vim-7.1.151/src/screen.c Mon Sep 17 22:37:05 2007
|
|
Karsten Hopp |
2b3c15 |
--- src/screen.c Fri Oct 19 15:18:49 2007
|
|
Karsten Hopp |
2b3c15 |
***************
|
|
Karsten Hopp |
2b3c15 |
*** 2599,2604 ****
|
|
Karsten Hopp |
2b3c15 |
--- 2599,2605 ----
|
|
Karsten Hopp |
2b3c15 |
int syntax_attr = 0; /* attributes desired by syntax */
|
|
Karsten Hopp |
2b3c15 |
int has_syntax = FALSE; /* this buffer has syntax highl. */
|
|
Karsten Hopp |
2b3c15 |
int save_did_emsg;
|
|
Karsten Hopp |
2b3c15 |
+ int eol_hl_off = 0; /* 1 if highlighted char after EOL */
|
|
Karsten Hopp |
2b3c15 |
#endif
|
|
Karsten Hopp |
2b3c15 |
#ifdef FEAT_SPELL
|
|
Karsten Hopp |
2b3c15 |
int has_spell = FALSE; /* this buffer has spell checking */
|
|
Karsten Hopp |
2b3c15 |
***************
|
|
Karsten Hopp |
2b3c15 |
*** 4312,4317 ****
|
|
Karsten Hopp |
2b3c15 |
--- 4313,4322 ----
|
|
Karsten Hopp |
2b3c15 |
{
|
|
Karsten Hopp |
2b3c15 |
#ifdef FEAT_SEARCH_EXTRA
|
|
Karsten Hopp |
2b3c15 |
long prevcol = (long)(ptr - line) - (c == NUL);
|
|
Karsten Hopp |
2b3c15 |
+
|
|
Karsten Hopp |
2b3c15 |
+ /* we're not really at that column when skipping some text */
|
|
Karsten Hopp |
2b3c15 |
+ if ((wp->w_p_wrap ? wp->w_skipcol : wp->w_leftcol) > prevcol)
|
|
Karsten Hopp |
2b3c15 |
+ ++prevcol;
|
|
Karsten Hopp |
2b3c15 |
#endif
|
|
Karsten Hopp |
2b3c15 |
|
|
Karsten Hopp |
2b3c15 |
/* invert at least one char, used for Visual and empty line or
|
|
Karsten Hopp |
2b3c15 |
***************
|
|
Karsten Hopp |
2b3c15 |
*** 4408,4418 ****
|
|
Karsten Hopp |
2b3c15 |
--- 4413,4432 ----
|
|
Karsten Hopp |
2b3c15 |
ScreenAttrs[off] = char_attr;
|
|
Karsten Hopp |
2b3c15 |
#ifdef FEAT_RIGHTLEFT
|
|
Karsten Hopp |
2b3c15 |
if (wp->w_p_rl)
|
|
Karsten Hopp |
2b3c15 |
+ {
|
|
Karsten Hopp |
2b3c15 |
--col;
|
|
Karsten Hopp |
2b3c15 |
+ --off;
|
|
Karsten Hopp |
2b3c15 |
+ }
|
|
Karsten Hopp |
2b3c15 |
else
|
|
Karsten Hopp |
2b3c15 |
#endif
|
|
Karsten Hopp |
2b3c15 |
+ {
|
|
Karsten Hopp |
2b3c15 |
++col;
|
|
Karsten Hopp |
2b3c15 |
+ ++off;
|
|
Karsten Hopp |
2b3c15 |
+ }
|
|
Karsten Hopp |
2b3c15 |
++vcol;
|
|
Karsten Hopp |
2b3c15 |
+ #ifdef FEAT_SYN_HL
|
|
Karsten Hopp |
2b3c15 |
+ eol_hl_off = 1;
|
|
Karsten Hopp |
2b3c15 |
+ #endif
|
|
Karsten Hopp |
2b3c15 |
}
|
|
Karsten Hopp |
2b3c15 |
}
|
|
Karsten Hopp |
2b3c15 |
|
|
Karsten Hopp |
2b3c15 |
***************
|
|
Karsten Hopp |
2b3c15 |
*** 4422,4427 ****
|
|
Karsten Hopp |
2b3c15 |
--- 4436,4449 ----
|
|
Karsten Hopp |
2b3c15 |
if (c == NUL)
|
|
Karsten Hopp |
2b3c15 |
{
|
|
Karsten Hopp |
2b3c15 |
#ifdef FEAT_SYN_HL
|
|
Karsten Hopp |
2b3c15 |
+ if (eol_hl_off > 0 && vcol - eol_hl_off == (long)wp->w_virtcol)
|
|
Karsten Hopp |
2b3c15 |
+ {
|
|
Karsten Hopp |
2b3c15 |
+ /* highlight last char after line */
|
|
Karsten Hopp |
2b3c15 |
+ --col;
|
|
Karsten Hopp |
2b3c15 |
+ --off;
|
|
Karsten Hopp |
2b3c15 |
+ --vcol;
|
|
Karsten Hopp |
2b3c15 |
+ }
|
|
Karsten Hopp |
2b3c15 |
+
|
|
Karsten Hopp |
2b3c15 |
/* Highlight 'cursorcolumn' past end of the line. */
|
|
Karsten Hopp |
2b3c15 |
if (wp->w_p_wrap)
|
|
Karsten Hopp |
2b3c15 |
v = wp->w_skipcol;
|
|
Karsten Hopp |
2b3c15 |
***************
|
|
Karsten Hopp |
2b3c15 |
*** 4432,4438 ****
|
|
Karsten Hopp |
2b3c15 |
|
|
Karsten Hopp |
2b3c15 |
vcol = v + col - win_col_off(wp);
|
|
Karsten Hopp |
2b3c15 |
if (wp->w_p_cuc
|
|
Karsten Hopp |
2b3c15 |
! && (int)wp->w_virtcol >= vcol
|
|
Karsten Hopp |
2b3c15 |
&& (int)wp->w_virtcol < W_WIDTH(wp) * (row - startrow + 1)
|
|
Karsten Hopp |
2b3c15 |
+ v
|
|
Karsten Hopp |
2b3c15 |
&& lnum != wp->w_cursor.lnum
|
|
Karsten Hopp |
2b3c15 |
--- 4454,4460 ----
|
|
Karsten Hopp |
2b3c15 |
|
|
Karsten Hopp |
2b3c15 |
vcol = v + col - win_col_off(wp);
|
|
Karsten Hopp |
2b3c15 |
if (wp->w_p_cuc
|
|
Karsten Hopp |
2b3c15 |
! && (int)wp->w_virtcol >= vcol - eol_hl_off
|
|
Karsten Hopp |
2b3c15 |
&& (int)wp->w_virtcol < W_WIDTH(wp) * (row - startrow + 1)
|
|
Karsten Hopp |
2b3c15 |
+ v
|
|
Karsten Hopp |
2b3c15 |
&& lnum != wp->w_cursor.lnum
|
|
Karsten Hopp |
2b3c15 |
*** ../vim-7.1.151/src/version.c Thu Nov 8 13:03:33 2007
|
|
Karsten Hopp |
2b3c15 |
--- src/version.c Thu Nov 8 14:48:59 2007
|
|
Karsten Hopp |
2b3c15 |
***************
|
|
Karsten Hopp |
2b3c15 |
*** 668,669 ****
|
|
Karsten Hopp |
2b3c15 |
--- 668,671 ----
|
|
Karsten Hopp |
2b3c15 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
2b3c15 |
+ /**/
|
|
Karsten Hopp |
2b3c15 |
+ 152,
|
|
Karsten Hopp |
2b3c15 |
/**/
|
|
Karsten Hopp |
2b3c15 |
|
|
Karsten Hopp |
2b3c15 |
--
|
|
Karsten Hopp |
2b3c15 |
From "know your smileys":
|
|
Karsten Hopp |
2b3c15 |
2B|^2B Message from Shakespeare
|
|
Karsten Hopp |
2b3c15 |
|
|
Karsten Hopp |
2b3c15 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
2b3c15 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
2b3c15 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
2b3c15 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|