comparison src/screen.c @ 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 76e7fb736c0e
children 4c25af735304
comparison
equal deleted inserted replaced
6105:41ccb42b8c05 6106:f051e50a6a5f
3700 ) 3700 )
3701 { 3701 {
3702 char_attr = 0; /* was: hl_attr(HLF_AT); */ 3702 char_attr = 0; /* was: hl_attr(HLF_AT); */
3703 #ifdef FEAT_DIFF 3703 #ifdef FEAT_DIFF
3704 if (diff_hlf != (hlf_T)0) 3704 if (diff_hlf != (hlf_T)0)
3705 {
3705 char_attr = hl_attr(diff_hlf); 3706 char_attr = hl_attr(diff_hlf);
3707 if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
3708 char_attr = hl_combine_attr(char_attr,
3709 hl_attr(HLF_CUL));
3710 }
3706 #endif 3711 #endif
3707 p_extra = NULL; 3712 p_extra = NULL;
3708 c_extra = ' '; 3713 c_extra = ' ';
3709 n_extra = get_breakindent_win(wp, 3714 n_extra = get_breakindent_win(wp,
3710 ml_get_buf(wp->w_buffer, lnum, FALSE)); 3715 ml_get_buf(wp->w_buffer, lnum, FALSE));
3751 if (tocol == vcol) 3756 if (tocol == vcol)
3752 tocol += n_extra; 3757 tocol += n_extra;
3753 #ifdef FEAT_SYN_HL 3758 #ifdef FEAT_SYN_HL
3754 /* combine 'showbreak' with 'cursorline' */ 3759 /* combine 'showbreak' with 'cursorline' */
3755 if (wp->w_p_cul && lnum == wp->w_cursor.lnum) 3760 if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
3756 char_attr = hl_combine_attr(char_attr, HLF_CLN); 3761 char_attr = hl_combine_attr(char_attr,
3762 hl_attr(HLF_CUL));
3757 #endif 3763 #endif
3758 } 3764 }
3759 # endif 3765 # endif
3760 } 3766 }
3761 #endif 3767 #endif
3929 diff_hlf = HLF_TXD; /* changed text */ 3935 diff_hlf = HLF_TXD; /* changed text */
3930 if (diff_hlf == HLF_TXD && ptr - line > change_end 3936 if (diff_hlf == HLF_TXD && ptr - line > change_end
3931 && n_extra == 0) 3937 && n_extra == 0)
3932 diff_hlf = HLF_CHD; /* changed line */ 3938 diff_hlf = HLF_CHD; /* changed line */
3933 line_attr = hl_attr(diff_hlf); 3939 line_attr = hl_attr(diff_hlf);
3940 if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
3941 line_attr = hl_combine_attr(line_attr, hl_attr(HLF_CUL));
3934 } 3942 }
3935 #endif 3943 #endif
3936 3944
3937 /* Decide which of the highlight attributes to use. */ 3945 /* Decide which of the highlight attributes to use. */
3938 attr_pri = TRUE; 3946 attr_pri = TRUE;
4727 # ifdef FEAT_DIFF 4735 # ifdef FEAT_DIFF
4728 if (diff_hlf == HLF_TXD) 4736 if (diff_hlf == HLF_TXD)
4729 { 4737 {
4730 diff_hlf = HLF_CHD; 4738 diff_hlf = HLF_CHD;
4731 if (attr == 0 || char_attr != attr) 4739 if (attr == 0 || char_attr != attr)
4740 {
4732 char_attr = hl_attr(diff_hlf); 4741 char_attr = hl_attr(diff_hlf);
4742 if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
4743 char_attr = hl_combine_attr(char_attr,
4744 hl_attr(HLF_CUL));
4745 }
4733 } 4746 }
4734 # endif 4747 # endif
4735 } 4748 }
4736 #endif 4749 #endif
4737 } 4750 }
10172 len = (int)STRLEN(NameBuff); 10185 len = (int)STRLEN(NameBuff);
10173 if (col + len >= Columns - 3) 10186 if (col + len >= Columns - 3)
10174 break; 10187 break;
10175 screen_puts_len(NameBuff, len, 0, col, 10188 screen_puts_len(NameBuff, len, 0, col,
10176 #if defined(FEAT_SYN_HL) 10189 #if defined(FEAT_SYN_HL)
10177 hl_combine_attr(attr, hl_attr(HLF_T)) 10190 hl_combine_attr(attr, hl_attr(HLF_T))
10178 #else 10191 #else
10179 attr 10192 attr
10180 #endif 10193 #endif
10181 ); 10194 );
10182 col += len; 10195 col += len;
10183 } 10196 }
10184 if (modified) 10197 if (modified)