summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2013-06-30 17:24:16 +0200
committerBram Moolenaar <bram@vim.org>2013-06-30 17:24:16 +0200
commit292befdd0d35d65a9b92493ff243fdc046705c9a (patch)
treeaf69656a32f66f76e78b21c08c4b3d3043111b46
parent6227034994eaef706636a6973eddd5402d48b144 (diff)
downloadvim-292befdd0d35d65a9b92493ff243fdc046705c9a.tar.gz
updated for version 7.3.1277v7.3.1277v7-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)
-rw-r--r--src/screen.c16
-rw-r--r--src/version.c2
2 files changed, 14 insertions, 4 deletions
diff --git a/src/screen.c b/src/screen.c
index b33a000d..eb1b1df4 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3366,9 +3366,11 @@ win_line(wp, lnum, startrow, endrow, nochange)
#endif
#ifdef FEAT_SYN_HL
- /* Cursor line highlighting for 'cursorline'. Not when Visual mode is
- * active, because it's not clear what is selected then. */
- if (wp->w_p_cul && lnum == wp->w_cursor.lnum && !VIsual_active)
+ /* 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)
{
line_attr = hl_attr(HLF_CUL);
area_highlighting = TRUE;
@@ -3541,7 +3543,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
* the current line differently.
* TODO: Can we use CursorLine instead of CursorLineNr
* 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)
char_attr = hl_attr(HLF_CLN);
#endif
@@ -3582,6 +3584,12 @@ win_line(wp, lnum, startrow, endrow, nochange)
* required when 'linebreak' is also set. */
if (tocol == vcol)
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
}
diff --git a/src/version.c b/src/version.c
index 08e2d794..a3b0657e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1277,
+/**/
1276,
/**/
1275,