Markus Heidelberg wrote:
> Conditions:
> * diff mode
> * visual selection (characterwise or blockwise) started on a line with
> DiffAdd, DiffChange or DiffText highlighting
> * cursor column <= start column of the visual selection
> * console Vim, GUI not in use (reproduced on Linux and Windows)
> -> character of the cursor should not be inverted (noinvcur=TRUE in
> the sources in win_line())
>
> Now the "Normal" highlighting is used instead of DiffAdd, DiffChange or
> DiffText from the first column of this line up until the cursor.
>
> To reproduce:
> vim -u NONE -U NONE -d -c "normal 7j7lv" misc1.c misc2.c
Thanks for the reproducible example.
I don't think the fix is correct though, it uses line_attr for almost
every position.
The problem is that "fromcol" can be -1, in which case fromcol_prev is
to be used. So this patch should work:
*** ../vim-7.2.132/src/screen.c Sun Feb 22 21:12:22 2009
--- src/screen.c Wed Mar 11 11:04:12 2009
***************
*** 3555,3561 ****
/* Use line_attr when not in the Visual or 'incsearch' area
* (area_attr may be 0 when "noinvcur" is set). */
else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL)
! || (vcol < fromcol || vcol >= tocol)))
char_attr = line_attr;
#endif
else
--- 3555,3562 ----
/* Use line_attr when not in the Visual or 'incsearch' area
* (area_attr may be 0 when "noinvcur" is set). */
else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL)
! || vcol < fromcol || vcol_prev < fromcol_prev
! || vcol >= tocol))
char_attr = line_attr;
#endif
else
--
hundred-and-one symptoms of being an internet addict:
190. You quickly hand over your wallet, leather jacket, and car keys
during a mugging, then proceed to beat the crap out of your
assailant when he asks for your laptop.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---