Re: CursorLine highlight invisible in DiffChanged areas
On Fr, 11 Jul 2014, Benjamin Fritz wrote: I'm not sure if this ever worked, but I noticed today that with 'cursorline' set, there is no highlight on lines that have DiffChange highlighting. Moving the cursor to a line without DiffChange highlighting makes the cursor visible again. I think this is a bug; it makes cursorline much less useful in diff mode. I think, the attached patch fixes it. Mit freundlichen Grüßen Christian -- Wie wir von manchen Menschen verkannt werden, beweisen uns nicht selten ihre Geschenke. -- Sigmund Graff -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. diff --git a/src/screen.c b/src/screen.c --- a/src/screen.c +++ b/src/screen.c @@ -3702,7 +3702,12 @@ win_line(wp, lnum, startrow, endrow, noc char_attr = 0; /* was: hl_attr(HLF_AT); */ #ifdef FEAT_DIFF if (diff_hlf != (hlf_T)0) - char_attr = hl_attr(diff_hlf); + { + if (wp-w_p_cul lnum == wp-w_cursor.lnum) + char_attr = hl_combine_attr(diff_hlf, hl_attr(HLF_CUC)); + else + char_attr = hl_attr(diff_hlf); + } #endif p_extra = NULL; c_extra = ' '; @@ -3930,7 +3935,10 @@ win_line(wp, lnum, startrow, endrow, noc if (diff_hlf == HLF_TXD ptr - line change_end n_extra == 0) diff_hlf = HLF_CHD; /* changed line */ - line_attr = hl_attr(diff_hlf); + if (wp-w_p_cul lnum == wp-w_cursor.lnum) + line_attr = hl_combine_attr(diff_hlf, hl_attr(HLF_CUC)); + else + line_attr = hl_attr(diff_hlf); } #endif @@ -4727,7 +4735,12 @@ win_line(wp, lnum, startrow, endrow, noc { diff_hlf = HLF_CHD; if (attr == 0 || char_attr != attr) - char_attr = hl_attr(diff_hlf); + { + if (wp-w_p_cul lnum == wp-w_cursor.lnum) +char_attr = hl_combine_attr(diff_hlf, hl_attr(HLF_CUC)); + else +char_attr = hl_attr(diff_hlf); + } } # endif }
Re: CursorLine highlight invisible in DiffChanged areas
Christian wrote: On Fr, 11 Jul 2014, Benjamin Fritz wrote: I'm not sure if this ever worked, but I noticed today that with 'cursorline' set, there is no highlight on lines that have DiffChange highlighting. Moving the cursor to a line without DiffChange highlighting makes the cursor visible again. I think this is a bug; it makes cursorline much less useful in diff mode. I think, the attached patch fixes it. Thanks for the patch. Does combining the two background colors actualy work? -- Permission is granted to read this message out aloud on Kings Cross Road, London, under the condition that the orator is properly dressed. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
CursorLine highlight invisible in DiffChanged areas
I'm not sure if this ever worked, but I noticed today that with 'cursorline' set, there is no highlight on lines that have DiffChange highlighting. Moving the cursor to a line without DiffChange highlighting makes the cursor visible again. I think this is a bug; it makes cursorline much less useful in diff mode. -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.