mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 8.1.2117: CursorLine highlight used while 'cursorline' is off
Problem: CursorLine highlight used while 'cursorline' is off. Solution: Check 'cursorline' is set. (cloes #5017)
This commit is contained in:
@@ -1113,11 +1113,11 @@ win_line(
|
|||||||
// the line number itself.
|
// the line number itself.
|
||||||
// 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
|
||||||
|
&& lnum == wp->w_cursor.lnum
|
||||||
&& (wp->w_p_culopt_flags & CULOPT_NBR)
|
&& (wp->w_p_culopt_flags & CULOPT_NBR)
|
||||||
&& (row == startrow
|
&& (row == startrow
|
||||||
|| wp->w_p_culopt_flags & CULOPT_LINE)
|
|| wp->w_p_culopt_flags & CULOPT_LINE))
|
||||||
&& lnum == wp->w_cursor.lnum)
|
|
||||||
char_attr = hl_combine_attr(wcr_attr, HL_ATTR(HLF_CLN));
|
char_attr = hl_combine_attr(wcr_attr, HL_ATTR(HLF_CLN));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -52,7 +52,7 @@ func Test_cursorline_highlight1()
|
|||||||
setl nocursorline relativenumber
|
setl nocursorline relativenumber
|
||||||
redraw
|
redraw
|
||||||
let attr31 = s:screen_attr(1)
|
let attr31 = s:screen_attr(1)
|
||||||
call assert_equal(attr21[0:3], attr31[0:3])
|
call assert_equal(attr22[0:3], attr31[0:3])
|
||||||
call assert_equal(attr11[4:7], attr31[4:7])
|
call assert_equal(attr11[4:7], attr31[4:7])
|
||||||
|
|
||||||
call s:close_windows()
|
call s:close_windows()
|
||||||
|
@@ -753,6 +753,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 */
|
||||||
|
/**/
|
||||||
|
2117,
|
||||||
/**/
|
/**/
|
||||||
2116,
|
2116,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user