Karsten Hopp a4c51d
To: vim_dev@googlegroups.com
Karsten Hopp a4c51d
Subject: Patch 7.4.667
Karsten Hopp a4c51d
Fcc: outbox
Karsten Hopp a4c51d
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp a4c51d
Mime-Version: 1.0
Karsten Hopp a4c51d
Content-Type: text/plain; charset=UTF-8
Karsten Hopp a4c51d
Content-Transfer-Encoding: 8bit
Karsten Hopp a4c51d
------------
Karsten Hopp a4c51d
Karsten Hopp a4c51d
Patch 7.4.667
Karsten Hopp a4c51d
Problem:    'colorcolumn' isn't drawn in a closed fold while 'cursorcolumn'
Karsten Hopp a4c51d
	    is. (Carlos Pita)
Karsten Hopp a4c51d
Solution:   Make it consistent. (Christian Brabandt)
Karsten Hopp a4c51d
Files:	    src/screen.c
Karsten Hopp a4c51d
Karsten Hopp a4c51d
Karsten Hopp a4c51d
*** ../vim-7.4.666/src/screen.c	2015-03-20 15:58:47.417117245 +0100
Karsten Hopp a4c51d
--- src/screen.c	2015-03-20 16:42:27.819592954 +0100
Karsten Hopp a4c51d
***************
Karsten Hopp a4c51d
*** 2740,2745 ****
Karsten Hopp a4c51d
--- 2740,2767 ----
Karsten Hopp a4c51d
      }
Karsten Hopp a4c51d
  
Karsten Hopp a4c51d
  #ifdef FEAT_SYN_HL
Karsten Hopp a4c51d
+     /* Show colorcolumn in the fold line, but let cursorcolumn override it. */
Karsten Hopp a4c51d
+     if (wp->w_p_cc_cols)
Karsten Hopp a4c51d
+     {
Karsten Hopp a4c51d
+ 	int i = 0;
Karsten Hopp a4c51d
+ 	int j = wp->w_p_cc_cols[i];
Karsten Hopp a4c51d
+ 	int old_txtcol = txtcol;
Karsten Hopp a4c51d
+ 
Karsten Hopp a4c51d
+ 	while (j > -1)
Karsten Hopp a4c51d
+ 	{
Karsten Hopp a4c51d
+ 	    txtcol += j;
Karsten Hopp a4c51d
+ 	    if (wp->w_p_wrap)
Karsten Hopp a4c51d
+ 		txtcol -= wp->w_skipcol;
Karsten Hopp a4c51d
+ 	    else
Karsten Hopp a4c51d
+ 		txtcol -= wp->w_leftcol;
Karsten Hopp a4c51d
+ 	    if (txtcol >= 0 && txtcol < W_WIDTH(wp))
Karsten Hopp a4c51d
+ 		ScreenAttrs[off + txtcol] = hl_combine_attr(
Karsten Hopp a4c51d
+ 				    ScreenAttrs[off + txtcol], hl_attr(HLF_MC));
Karsten Hopp a4c51d
+ 	    txtcol = old_txtcol;
Karsten Hopp a4c51d
+ 	    j = wp->w_p_cc_cols[++i];
Karsten Hopp a4c51d
+ 	}
Karsten Hopp a4c51d
+     }
Karsten Hopp a4c51d
+ 
Karsten Hopp a4c51d
      /* Show 'cursorcolumn' in the fold line. */
Karsten Hopp a4c51d
      if (wp->w_p_cuc)
Karsten Hopp a4c51d
      {
Karsten Hopp a4c51d
*** ../vim-7.4.666/src/version.c	2015-03-20 16:26:48.974173903 +0100
Karsten Hopp a4c51d
--- src/version.c	2015-03-20 16:36:14.035803222 +0100
Karsten Hopp a4c51d
***************
Karsten Hopp a4c51d
*** 743,744 ****
Karsten Hopp a4c51d
--- 743,746 ----
Karsten Hopp a4c51d
  {   /* Add new patch number below this line */
Karsten Hopp a4c51d
+ /**/
Karsten Hopp a4c51d
+     667,
Karsten Hopp a4c51d
  /**/
Karsten Hopp a4c51d
Karsten Hopp a4c51d
-- 
Karsten Hopp a4c51d
ARTHUR:  Shut up!  Will you shut up!
Karsten Hopp a4c51d
DENNIS:  Ah, now we see the violence inherent in the system.
Karsten Hopp a4c51d
ARTHUR:  Shut up!
Karsten Hopp a4c51d
DENNIS:  Oh!  Come and see the violence inherent in the system!
Karsten Hopp a4c51d
         HELP! HELP!  I'm being repressed!
Karsten Hopp a4c51d
                                  The Quest for the Holy Grail (Monty Python)
Karsten Hopp a4c51d
Karsten Hopp a4c51d
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp a4c51d
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp a4c51d
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp a4c51d
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///