astepano / rpms / vim

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