Karsten Hopp 4c3c33
To: vim_dev@googlegroups.com
Karsten Hopp 4c3c33
Subject: Patch 7.3.1277
Karsten Hopp 4c3c33
Fcc: outbox
Karsten Hopp 4c3c33
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 4c3c33
Mime-Version: 1.0
Karsten Hopp 4c3c33
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 4c3c33
Content-Transfer-Encoding: 8bit
Karsten Hopp 4c3c33
------------
Karsten Hopp 4c3c33
Karsten Hopp 4c3c33
Patch 7.3.1277
Karsten Hopp 4c3c33
Problem:    In diff mode 'cursorline' also draws in the non-active window.
Karsten Hopp 4c3c33
	    When 'nu' and 'sbr' are set the 'sbr' string is not underlined.
Karsten Hopp 4c3c33
Solution:   Only draw the cursor line in the current window. Combine the
Karsten Hopp 4c3c33
	    'cursorline' and other highlighting attributes. (Christian
Karsten Hopp 4c3c33
	    Brabandt)
Karsten Hopp 4c3c33
Files:	    src/screen.c
Karsten Hopp 4c3c33
Karsten Hopp 4c3c33
Karsten Hopp 4c3c33
*** ../vim-7.3.1276/src/screen.c	2013-06-15 23:00:26.000000000 +0200
Karsten Hopp 4c3c33
--- src/screen.c	2013-06-30 17:13:16.000000000 +0200
Karsten Hopp 4c3c33
***************
Karsten Hopp 4c3c33
*** 3366,3374 ****
Karsten Hopp 4c3c33
  #endif
Karsten Hopp 4c3c33
  
Karsten Hopp 4c3c33
  #ifdef FEAT_SYN_HL
Karsten Hopp 4c3c33
!     /* Cursor line highlighting for 'cursorline'.  Not when Visual mode is
Karsten Hopp 4c3c33
!      * active, because it's not clear what is selected then. */
Karsten Hopp 4c3c33
!     if (wp->w_p_cul && lnum == wp->w_cursor.lnum && !VIsual_active)
Karsten Hopp 4c3c33
      {
Karsten Hopp 4c3c33
  	line_attr = hl_attr(HLF_CUL);
Karsten Hopp 4c3c33
  	area_highlighting = TRUE;
Karsten Hopp 4c3c33
--- 3366,3376 ----
Karsten Hopp 4c3c33
  #endif
Karsten Hopp 4c3c33
  
Karsten Hopp 4c3c33
  #ifdef FEAT_SYN_HL
Karsten Hopp 4c3c33
!     /* Cursor line highlighting for 'cursorline' in the current window.  Not
Karsten Hopp 4c3c33
!      * when Visual mode is active, because it's not clear what is selected
Karsten Hopp 4c3c33
!      * then. */
Karsten Hopp 4c3c33
!     if (wp->w_p_cul && wp == curwin && lnum == wp->w_cursor.lnum
Karsten Hopp 4c3c33
! 							    && !VIsual_active)
Karsten Hopp 4c3c33
      {
Karsten Hopp 4c3c33
  	line_attr = hl_attr(HLF_CUL);
Karsten Hopp 4c3c33
  	area_highlighting = TRUE;
Karsten Hopp 4c3c33
***************
Karsten Hopp 4c3c33
*** 3541,3547 ****
Karsten Hopp 4c3c33
  		     * the current line differently.
Karsten Hopp 4c3c33
  		     * TODO: Can we use CursorLine instead of CursorLineNr
Karsten Hopp 4c3c33
  		     * when CursorLineNr isn't set? */
Karsten Hopp 4c3c33
! 		    if ((wp->w_p_cul || wp->w_p_rnu)
Karsten Hopp 4c3c33
  						 && lnum == wp->w_cursor.lnum)
Karsten Hopp 4c3c33
  			char_attr = hl_attr(HLF_CLN);
Karsten Hopp 4c3c33
  #endif
Karsten Hopp 4c3c33
--- 3543,3549 ----
Karsten Hopp 4c3c33
  		     * the current line differently.
Karsten Hopp 4c3c33
  		     * TODO: Can we use CursorLine instead of CursorLineNr
Karsten Hopp 4c3c33
  		     * when CursorLineNr isn't set? */
Karsten Hopp 4c3c33
! 		    if (((wp->w_p_cul && wp == curwin) || wp->w_p_rnu)
Karsten Hopp 4c3c33
  						 && lnum == wp->w_cursor.lnum)
Karsten Hopp 4c3c33
  			char_attr = hl_attr(HLF_CLN);
Karsten Hopp 4c3c33
  #endif
Karsten Hopp 4c3c33
***************
Karsten Hopp 4c3c33
*** 3582,3587 ****
Karsten Hopp 4c3c33
--- 3584,3595 ----
Karsten Hopp 4c3c33
  		     * required when 'linebreak' is also set. */
Karsten Hopp 4c3c33
  		    if (tocol == vcol)
Karsten Hopp 4c3c33
  			tocol += n_extra;
Karsten Hopp 4c3c33
+ #ifdef FEAT_SYN_HL
Karsten Hopp 4c3c33
+ 		    /* combine 'showbreak' with 'cursorline' */
Karsten Hopp 4c3c33
+ 		    if (wp->w_p_cul && wp == curwin
Karsten Hopp 4c3c33
+ 						 && lnum == wp->w_cursor.lnum)
Karsten Hopp 4c3c33
+ 			char_attr = hl_combine_attr(char_attr, HLF_CLN);
Karsten Hopp 4c3c33
+ #endif
Karsten Hopp 4c3c33
  		}
Karsten Hopp 4c3c33
  # endif
Karsten Hopp 4c3c33
  	    }
Karsten Hopp 4c3c33
*** ../vim-7.3.1276/src/version.c	2013-06-30 17:22:19.000000000 +0200
Karsten Hopp 4c3c33
--- src/version.c	2013-06-30 17:07:24.000000000 +0200
Karsten Hopp 4c3c33
***************
Karsten Hopp 4c3c33
*** 730,731 ****
Karsten Hopp 4c3c33
--- 730,733 ----
Karsten Hopp 4c3c33
  {   /* Add new patch number below this line */
Karsten Hopp 4c3c33
+ /**/
Karsten Hopp 4c3c33
+     1277,
Karsten Hopp 4c3c33
  /**/
Karsten Hopp 4c3c33
Karsten Hopp 4c3c33
-- 
Karsten Hopp 4c3c33
ARTHUR:  Then who is your lord?
Karsten Hopp 4c3c33
WOMAN:   We don't have a lord.
Karsten Hopp 4c3c33
ARTHUR:  What?
Karsten Hopp 4c3c33
DENNIS:  I told you.  We're an anarcho-syndicalist commune.  We take it in
Karsten Hopp 4c3c33
         turns to act as a sort of executive officer for the week.
Karsten Hopp 4c3c33
                                  The Quest for the Holy Grail (Monty Python)
Karsten Hopp 4c3c33
Karsten Hopp 4c3c33
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 4c3c33
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 4c3c33
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 4c3c33
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///