jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone
073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.627
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.627
073263
Problem:    The last screen cell is not updated.
073263
Solution:   Respect the "tn" termcap feature. (Hayaki Saito)
073263
Files:	    runtime/doc/term.txt, src/option.c, src/screen.c, src/term.c,
073263
	    src/term.h
073263
073263
073263
*** ../vim-7.4.626/runtime/doc/term.txt	2013-08-10 13:25:02.000000000 +0200
073263
--- runtime/doc/term.txt	2015-02-10 19:11:54.110597132 +0100
073263
***************
073263
*** 224,233 ****
073263
  the last two characters of the option name.  Only one termcap code is
073263
  required: Cursor motion, 't_cm'.
073263
  
073263
! The options 't_da', 't_db', 't_ms', 't_xs' represent flags in the termcap.
073263
! When the termcap flag is present, the option will be set to "y".  But any
073263
! non-empty string means that the flag is set.  An empty string means that the
073263
! flag is not set.  't_CS' works like this too, but it isn't a termcap flag.
073263
  
073263
  OUTPUT CODES
073263
  	option	meaning	~
073263
--- 224,234 ----
073263
  the last two characters of the option name.  Only one termcap code is
073263
  required: Cursor motion, 't_cm'.
073263
  
073263
! The options 't_da', 't_db', 't_ms', 't_xs', 't_xn' represent flags in the
073263
! termcap.  When the termcap flag is present, the option will be set to "y".
073263
! But any non-empty string means that the flag is set.  An empty string means
073263
! that the flag is not set.  't_CS' works like this too, but it isn't a termcap
073263
! flag.
073263
  
073263
  OUTPUT CODES
073263
  	option	meaning	~
073263
***************
073263
*** 281,286 ****
073263
--- 282,290 ----
073263
  	t_vs	cursor very visible				*t_vs* *'t_vs'*
073263
  								*t_xs* *'t_xs'*
073263
  	t_xs	if non-empty, standout not erased by overwriting (hpterm)
073263
+ 								*t_xn* *'t_xn'*
073263
+ 	t_xn	if non-empty, character writing at the last cell of screen
073263
+ 		didn't causes scrolling
073263
  	t_ZH	italics mode					*t_ZH* *'t_ZH'*
073263
  	t_ZR	italics end					*t_ZR* *'t_ZR'*
073263
  
073263
*** ../vim-7.4.626/src/option.c	2015-02-03 13:00:34.400529686 +0100
073263
--- src/option.c	2015-02-10 19:13:36.997250501 +0100
073263
***************
073263
*** 2978,2983 ****
073263
--- 2978,2984 ----
073263
      p_term("t_WS", T_CWS)
073263
      p_term("t_SI", T_CSI)
073263
      p_term("t_EI", T_CEI)
073263
+     p_term("t_xn", T_XN)
073263
      p_term("t_xs", T_XS)
073263
      p_term("t_ZH", T_CZH)
073263
      p_term("t_ZR", T_CZR)
073263
*** ../vim-7.4.626/src/screen.c	2015-01-27 16:39:24.691804113 +0100
073263
--- src/screen.c	2015-02-10 19:18:43.913231114 +0100
073263
***************
073263
*** 7968,7976 ****
073263
      if (row >= screen_Rows || col >= screen_Columns)
073263
  	return;
073263
  
073263
!     /* Outputting the last character on the screen may scrollup the screen.
073263
!      * Don't to it!  Mark the character invalid (update it when scrolled up) */
073263
!     if (row == screen_Rows - 1 && col == screen_Columns - 1
073263
  #ifdef FEAT_RIGHTLEFT
073263
  	    /* account for first command-line character in rightleft mode */
073263
  	    && !cmdmsg_rl
073263
--- 7968,7978 ----
073263
      if (row >= screen_Rows || col >= screen_Columns)
073263
  	return;
073263
  
073263
!     /* Outputting a character in the last cell on the screen may scroll the
073263
!      * screen up.  Only do it when the "xn" termcap property is set, otherwise
073263
!      * mark the character invalid (update it when scrolled up). */
073263
!     if (*T_XN == NUL
073263
! 	    && row == screen_Rows - 1 && col == screen_Columns - 1
073263
  #ifdef FEAT_RIGHTLEFT
073263
  	    /* account for first command-line character in rightleft mode */
073263
  	    && !cmdmsg_rl
073263
*** ../vim-7.4.626/src/term.c	2014-07-30 17:21:53.819518506 +0200
073263
--- src/term.c	2015-02-10 19:11:54.118597027 +0100
073263
***************
073263
*** 200,205 ****
073263
--- 200,206 ----
073263
      {(int)KS_VB,	IF_EB("\033|f", ESC_STR "|f")},
073263
      {(int)KS_MS,	"y"},
073263
      {(int)KS_UT,	"y"},
073263
+     {(int)KS_XN,	"y"},
073263
      {(int)KS_LE,	"\b"},		/* cursor-left = BS */
073263
      {(int)KS_ND,	"\014"},	/* cursor-right = CTRL-L */
073263
  # ifdef TERMINFO
073263
***************
073263
*** 658,663 ****
073263
--- 659,665 ----
073263
  
073263
      {(int)KS_MS,	"y"},		/* save to move cur in reverse mode */
073263
      {(int)KS_UT,	"y"},
073263
+     {(int)KS_XN,	"y"},
073263
      {(int)KS_LE,	"\b"},
073263
  #  ifdef TERMINFO
073263
      {(int)KS_CM,	"\033|%i%p1%d;%p2%dH"},/* cursor motion */
073263
***************
073263
*** 772,777 ****
073263
--- 774,780 ----
073263
      {(int)KS_CSF,	IF_EB("\033[101;%dm", ESC_STR "[101;%dm")},	/* set screen foreground color */
073263
      {(int)KS_MS,	"y"},
073263
      {(int)KS_UT,	"y"},
073263
+     {(int)KS_XN,	"y"},
073263
      {(int)KS_LE,	"\b"},
073263
  #  ifdef TERMINFO
073263
      {(int)KS_CM,	IF_EB("\033[%i%p1%d;%p2%dH",
073263
***************
073263
*** 1207,1212 ****
073263
--- 1210,1216 ----
073263
      {(int)KS_UCS,	"[UCS]"},
073263
      {(int)KS_MS,	"[MS]"},
073263
      {(int)KS_UT,	"[UT]"},
073263
+     {(int)KS_XN,	"[XN]"},
073263
  #  ifdef TERMINFO
073263
      {(int)KS_CM,	"[%p1%dCM%p2%d]"},
073263
  #  else
073263
***************
073263
*** 1645,1650 ****
073263
--- 1649,1657 ----
073263
  		if ((T_XS == NULL || T_XS == empty_option)
073263
  							&& tgetflag("xs") > 0)
073263
  		    T_XS = (char_u *)"y";
073263
+ 		if ((T_XN == NULL || T_XN == empty_option)
073263
+ 							&& tgetflag("xn") > 0)
073263
+ 		    T_XN = (char_u *)"y";
073263
  		if ((T_DB == NULL || T_DB == empty_option)
073263
  							&& tgetflag("db") > 0)
073263
  		    T_DB = (char_u *)"y";
073263
*** ../vim-7.4.626/src/term.h	2013-03-13 19:09:03.000000000 +0100
073263
--- src/term.h	2015-02-10 19:11:54.118597027 +0100
073263
***************
073263
*** 66,71 ****
073263
--- 66,72 ----
073263
      KS_CSF,	/* set foreground color */
073263
      KS_CSB,	/* set background color */
073263
      KS_XS,	/* standout not erased by overwriting (hpterm) */
073263
+     KS_XN,	/* newline glitch */
073263
      KS_MB,	/* blink mode */
073263
      KS_CAF,	/* set foreground color (ANSI) */
073263
      KS_CAB,	/* set background color (ANSI) */
073263
***************
073263
*** 144,149 ****
073263
--- 145,151 ----
073263
  #define T_CSF	(term_str(KS_CSF))	/* set foreground color */
073263
  #define T_CSB	(term_str(KS_CSB))	/* set background color */
073263
  #define T_XS	(term_str(KS_XS))	/* standout not erased by overwriting */
073263
+ #define T_XN	(term_str(KS_XN))	/* newline glitch */
073263
  #define T_MB	(term_str(KS_MB))	/* blink mode */
073263
  #define T_CAF	(term_str(KS_CAF))	/* set foreground color (ANSI) */
073263
  #define T_CAB	(term_str(KS_CAB))	/* set background color (ANSI) */
073263
*** ../vim-7.4.626/src/version.c	2015-02-10 18:47:55.225390610 +0100
073263
--- src/version.c	2015-02-10 19:12:50.525858691 +0100
073263
***************
073263
*** 743,744 ****
073263
--- 743,746 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     627,
073263
  /**/
073263
073263
-- 
073263
msdn.microsoft.com:
073263
ERROR_SUCCESS 0 (0x0) The operation completed successfully.
073263
I have always suspected that for Microsoft success is an error.
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///