cba6d5e
To: vim-dev@vim.org
cba6d5e
Subject: Patch 7.2.281
cba6d5e
Fcc: outbox
cba6d5e
From: Bram Moolenaar <Bram@moolenaar.net>
cba6d5e
Mime-Version: 1.0
cba6d5e
Content-Type: text/plain; charset=UTF-8
cba6d5e
Content-Transfer-Encoding: 8bit
cba6d5e
------------
cba6d5e
cba6d5e
Patch 7.2.281
cba6d5e
Problem:    'cursorcolumn' highlighting is wrong in diff mode.
cba6d5e
Solution:   Adjust the column computation. (Lech Lorens)
cba6d5e
Files:	    src/screen.c
cba6d5e
cba6d5e
cba6d5e
*** ../vim-7.2.280/src/screen.c	2009-11-03 17:20:18.000000000 +0100
cba6d5e
--- src/screen.c	2009-11-03 17:13:16.000000000 +0100
cba6d5e
***************
cba6d5e
*** 3008,3018 ****
cba6d5e
  	    mb_ptr_adv(ptr);
cba6d5e
  	}
cba6d5e
  
cba6d5e
! #ifdef FEAT_VIRTUALEDIT
cba6d5e
! 	/* When 'virtualedit' is set the end of the line may be before the
cba6d5e
! 	 * start of the displayed part. */
cba6d5e
! 	if (vcol < v && *ptr == NUL && virtual_active())
cba6d5e
  	    vcol = v;
cba6d5e
  #endif
cba6d5e
  
cba6d5e
  	/* Handle a character that's not completely on the screen: Put ptr at
cba6d5e
--- 3008,3040 ----
cba6d5e
  	    mb_ptr_adv(ptr);
cba6d5e
  	}
cba6d5e
  
cba6d5e
! #if defined(FEAT_SYN_HL) || defined(FEAT_VIRTUALEDIT) || defined(FEAT_VISUAL)
cba6d5e
! 	/* When:
cba6d5e
! 	 * - 'cuc' is set, or
cba6d5e
! 	 * - 'virtualedit' is set, or
cba6d5e
! 	 * - the visual mode is active,
cba6d5e
! 	 * the end of the line may be before the start of the displayed part.
cba6d5e
! 	 */
cba6d5e
! 	if (vcol < v && (
cba6d5e
! # ifdef FEAT_SYN_HL
cba6d5e
! 	     wp->w_p_cuc
cba6d5e
! #  if defined(FEAT_VIRTUALEDIT) || defined(FEAT_VISUAL)
cba6d5e
! 	     ||
cba6d5e
! #  endif
cba6d5e
! # endif
cba6d5e
! # ifdef FEAT_VIRTUALEDIT
cba6d5e
! 	     virtual_active()
cba6d5e
! #  ifdef FEAT_VISUAL
cba6d5e
! 	     ||
cba6d5e
! #  endif
cba6d5e
! # endif
cba6d5e
! # ifdef FEAT_VISUAL
cba6d5e
! 	     (VIsual_active && wp->w_buffer == curwin->w_buffer)
cba6d5e
! # endif
cba6d5e
! 	     ))
cba6d5e
! 	{
cba6d5e
  	    vcol = v;
cba6d5e
+ 	}
cba6d5e
  #endif
cba6d5e
  
cba6d5e
  	/* Handle a character that's not completely on the screen: Put ptr at
cba6d5e
*** ../vim-7.2.280/src/version.c	2009-11-03 17:20:18.000000000 +0100
cba6d5e
--- src/version.c	2009-11-03 17:34:54.000000000 +0100
cba6d5e
***************
cba6d5e
*** 678,679 ****
cba6d5e
--- 678,681 ----
cba6d5e
  {   /* Add new patch number below this line */
cba6d5e
+ /**/
cba6d5e
+     281,
cba6d5e
  /**/
cba6d5e
cba6d5e
-- 
cba6d5e
Every person is responsible for the choices he makes.
cba6d5e
cba6d5e
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
cba6d5e
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
cba6d5e
\\\        download, build and distribute -- http://www.A-A-P.org        ///
cba6d5e
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///