Mercurial > vim
changeset 5078:22ac43fb6d30 v7.3.1282
updated for version 7.3.1282
Problem: 'cursorline' not drawn in any other window. (Charles Campbell)
Solution: Do draw the cursor line in other windows.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Mon, 01 Jul 2013 20:18:33 +0200 |
parents | a041ca5ae9a8 |
children | 7798d6f89190 |
files | src/screen.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -3369,8 +3369,8 @@ win_line(wp, lnum, startrow, endrow, noc /* Cursor line highlighting for 'cursorline' in the current window. Not * when Visual mode is active, because it's not clear what is selected * then. */ - if (wp->w_p_cul && wp == curwin && lnum == wp->w_cursor.lnum - && !VIsual_active) + if (wp->w_p_cul && lnum == wp->w_cursor.lnum + && !(wp == curwin && VIsual_active)) { line_attr = hl_attr(HLF_CUL); area_highlighting = TRUE; @@ -3543,7 +3543,7 @@ win_line(wp, lnum, startrow, endrow, noc * the current line differently. * TODO: Can we use CursorLine instead of CursorLineNr * when CursorLineNr isn't set? */ - if (((wp->w_p_cul && wp == curwin) || wp->w_p_rnu) + if ((wp->w_p_cul || wp->w_p_rnu) && lnum == wp->w_cursor.lnum) char_attr = hl_attr(HLF_CLN); #endif @@ -3586,8 +3586,7 @@ win_line(wp, lnum, startrow, endrow, noc tocol += n_extra; #ifdef FEAT_SYN_HL /* combine 'showbreak' with 'cursorline' */ - if (wp->w_p_cul && wp == curwin - && lnum == wp->w_cursor.lnum) + if (wp->w_p_cul && lnum == wp->w_cursor.lnum) char_attr = hl_combine_attr(char_attr, HLF_CLN); #endif }