Mercurial > vim
changeset 6106:f051e50a6a5f v7.4.391
updated for version 7.4.391
Problem: No 'cursorline' highlighting when the cursor is on a line with
diff highlighting. (Benjamin Fritz)
Solution: Combine the highlight attributes. (Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 06 Aug 2014 13:20:56 +0200 |
parents | 41ccb42b8c05 |
children | 05f6b7fe8eda |
files | src/screen.c src/version.c |
diffstat | 2 files changed, 18 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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(char_attr, + hl_attr(HLF_CUL)); + } #endif p_extra = NULL; c_extra = ' '; @@ -3753,7 +3758,8 @@ win_line(wp, lnum, startrow, endrow, noc #ifdef FEAT_SYN_HL /* combine 'showbreak' with 'cursorline' */ if (wp->w_p_cul && lnum == wp->w_cursor.lnum) - char_attr = hl_combine_attr(char_attr, HLF_CLN); + char_attr = hl_combine_attr(char_attr, + hl_attr(HLF_CUL)); #endif } # endif @@ -3931,6 +3937,8 @@ win_line(wp, lnum, startrow, endrow, noc && 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(line_attr, hl_attr(HLF_CUL)); } #endif @@ -4729,7 +4737,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(char_attr, + hl_attr(HLF_CUL)); + } } # endif } @@ -10174,9 +10187,9 @@ draw_tabline() break; screen_puts_len(NameBuff, len, 0, col, #if defined(FEAT_SYN_HL) - hl_combine_attr(attr, hl_attr(HLF_T)) + hl_combine_attr(attr, hl_attr(HLF_T)) #else - attr + attr #endif ); col += len;