mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.3.1277
Problem: In diff mode 'cursorline' also draws in the non-active window. When 'nu' and 'sbr' are set the 'sbr' string is not underlined. Solution: Only draw the cursor line in the current window. Combine the 'cursorline' and other highlighting attributes. (Christian Brabandt)
This commit is contained in:
16
src/screen.c
16
src/screen.c
@@ -3366,9 +3366,11 @@ win_line(wp, lnum, startrow, endrow, nochange)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FEAT_SYN_HL
|
#ifdef FEAT_SYN_HL
|
||||||
/* Cursor line highlighting for 'cursorline'. Not when Visual mode is
|
/* Cursor line highlighting for 'cursorline' in the current window. Not
|
||||||
* active, because it's not clear what is selected then. */
|
* when Visual mode is active, because it's not clear what is selected
|
||||||
if (wp->w_p_cul && lnum == wp->w_cursor.lnum && !VIsual_active)
|
* then. */
|
||||||
|
if (wp->w_p_cul && wp == curwin && lnum == wp->w_cursor.lnum
|
||||||
|
&& !VIsual_active)
|
||||||
{
|
{
|
||||||
line_attr = hl_attr(HLF_CUL);
|
line_attr = hl_attr(HLF_CUL);
|
||||||
area_highlighting = TRUE;
|
area_highlighting = TRUE;
|
||||||
@@ -3541,7 +3543,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
|
|||||||
* the current line differently.
|
* the current line differently.
|
||||||
* TODO: Can we use CursorLine instead of CursorLineNr
|
* TODO: Can we use CursorLine instead of CursorLineNr
|
||||||
* when CursorLineNr isn't set? */
|
* when CursorLineNr isn't set? */
|
||||||
if ((wp->w_p_cul || wp->w_p_rnu)
|
if (((wp->w_p_cul && wp == curwin) || wp->w_p_rnu)
|
||||||
&& lnum == wp->w_cursor.lnum)
|
&& lnum == wp->w_cursor.lnum)
|
||||||
char_attr = hl_attr(HLF_CLN);
|
char_attr = hl_attr(HLF_CLN);
|
||||||
#endif
|
#endif
|
||||||
@@ -3582,6 +3584,12 @@ win_line(wp, lnum, startrow, endrow, nochange)
|
|||||||
* required when 'linebreak' is also set. */
|
* required when 'linebreak' is also set. */
|
||||||
if (tocol == vcol)
|
if (tocol == vcol)
|
||||||
tocol += n_extra;
|
tocol += n_extra;
|
||||||
|
#ifdef FEAT_SYN_HL
|
||||||
|
/* combine 'showbreak' with 'cursorline' */
|
||||||
|
if (wp->w_p_cul && wp == curwin
|
||||||
|
&& lnum == wp->w_cursor.lnum)
|
||||||
|
char_attr = hl_combine_attr(char_attr, HLF_CLN);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
@@ -728,6 +728,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1277,
|
||||||
/**/
|
/**/
|
||||||
1276,
|
1276,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user