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