ea46500
To: vim-dev@vim.org
ea46500
Subject: Patch 7.2.023
ea46500
Fcc: outbox
ea46500
From: Bram Moolenaar <Bram@moolenaar.net>
ea46500
Mime-Version: 1.0
ea46500
Content-Type: text/plain; charset=ISO-8859-1
ea46500
Content-Transfer-Encoding: 8bit
ea46500
------------
ea46500
ea46500
Patch 7.2.023
ea46500
Problem:    'cursorcolumn' is in the wrong place in a closed fold when the
ea46500
	    display is shifted left. (Gary Johnson)
ea46500
Solution:   Subtract w_skipcol or w_leftcol when needed.
ea46500
Files:	    src/screen.c
ea46500
ea46500
ea46500
*** ../vim-7.2.022/src/screen.c	Thu Jul 24 20:29:09 2008
ea46500
--- src/screen.c	Fri Sep 26 21:23:06 2008
ea46500
***************
ea46500
*** 2439,2447 ****
ea46500
  
ea46500
  #ifdef FEAT_SYN_HL
ea46500
      /* Show 'cursorcolumn' in the fold line. */
ea46500
!     if (wp->w_p_cuc && (int)wp->w_virtcol + txtcol < W_WIDTH(wp))
ea46500
! 	ScreenAttrs[off + wp->w_virtcol + txtcol] = hl_combine_attr(
ea46500
! 		 ScreenAttrs[off + wp->w_virtcol + txtcol], hl_attr(HLF_CUC));
ea46500
  #endif
ea46500
  
ea46500
      SCREEN_LINE(row + W_WINROW(wp), W_WINCOL(wp), (int)W_WIDTH(wp),
ea46500
--- 2439,2455 ----
ea46500
  
ea46500
  #ifdef FEAT_SYN_HL
ea46500
      /* Show 'cursorcolumn' in the fold line. */
ea46500
!     if (wp->w_p_cuc)
ea46500
!     {
ea46500
! 	txtcol += wp->w_virtcol;
ea46500
! 	if (wp->w_p_wrap)
ea46500
! 	    txtcol -= wp->w_skipcol;
ea46500
! 	else
ea46500
! 	    txtcol -= wp->w_leftcol;
ea46500
! 	if (txtcol >= 0 && txtcol < W_WIDTH(wp))
ea46500
! 	    ScreenAttrs[off + txtcol] = hl_combine_attr(
ea46500
! 				 ScreenAttrs[off + txtcol], hl_attr(HLF_CUC));
ea46500
!     }
ea46500
  #endif
ea46500
  
ea46500
      SCREEN_LINE(row + W_WINROW(wp), W_WINCOL(wp), (int)W_WIDTH(wp),
ea46500
*** ../vim-7.2.022/src/version.c	Sat Sep 20 16:26:10 2008
ea46500
--- src/version.c	Wed Oct  1 21:07:31 2008
ea46500
***************
ea46500
*** 678,679 ****
ea46500
--- 678,681 ----
ea46500
  {   /* Add new patch number below this line */
ea46500
+ /**/
ea46500
+     23,
ea46500
  /**/
ea46500
ea46500
-- 
ea46500
hundred-and-one symptoms of being an internet addict:
ea46500
124. You begin conversations with, "Who is your internet service provider?"
ea46500
ea46500
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
ea46500
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
ea46500
\\\        download, build and distribute -- http://www.A-A-P.org        ///
ea46500
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///