mirror of
https://github.com/vim/vim.git
synced 2025-10-28 09:27:14 -04:00
patch 9.0.1067: in diff mode virtual text is highlighted incorrectly
Problem: In diff mode virtual text is highlighted incorrectly. (Rick Howe) Solution: Do not use diff attributes for virtual text. (closes #11714)
This commit is contained in:
@@ -2206,11 +2206,13 @@ win_line(
|
||||
#ifdef FEAT_DIFF
|
||||
if (wlv.diff_hlf != (hlf_T)0)
|
||||
{
|
||||
// When there is extra text (e.g. virtual text) it gets the
|
||||
// diff highlighting for the line, but not for changed text.
|
||||
if (wlv.diff_hlf == HLF_CHD && ptr - line >= change_start
|
||||
&& wlv.n_extra == 0)
|
||||
wlv.diff_hlf = HLF_TXD; // changed text
|
||||
if (wlv.diff_hlf == HLF_TXD && ptr - line > change_end
|
||||
&& wlv.n_extra == 0)
|
||||
if (wlv.diff_hlf == HLF_TXD && (ptr - line > change_end
|
||||
|| wlv.n_extra > 0))
|
||||
wlv.diff_hlf = HLF_CHD; // changed line
|
||||
wlv.line_attr = HL_ATTR(wlv.diff_hlf);
|
||||
if (wp->w_p_cul && lnum == wp->w_cursor.lnum
|
||||
|
||||
Reference in New Issue
Block a user