]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.4.627 v7.4.627
authorBram Moolenaar <Bram@vim.org>
Tue, 10 Feb 2015 18:20:37 +0000 (19:20 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 10 Feb 2015 18:20:37 +0000 (19:20 +0100)
Problem:    The last screen cell is not updated.
Solution:   Respect the "tn" termcap feature. (Hayaki Saito)

runtime/doc/term.txt
src/option.c
src/screen.c
src/term.c
src/term.h
src/version.c

index 2076e83421373172fecf8426bd425ae6a4bce328..842f69b656df0ff3f87ab994012d1d7dd15666ff 100644 (file)
@@ -224,10 +224,11 @@ The options are listed below.  The associated termcap code is always equal to
 the last two characters of the option name.  Only one termcap code is
 required: Cursor motion, 't_cm'.
 
-The options 't_da', 't_db', 't_ms', 't_xs' represent flags in the termcap.
-When the termcap flag is present, the option will be set to "y".  But any
-non-empty string means that the flag is set.  An empty string means that the
-flag is not set.  't_CS' works like this too, but it isn't a termcap flag.
+The options 't_da', 't_db', 't_ms', 't_xs', 't_xn' represent flags in the
+termcap.  When the termcap flag is present, the option will be set to "y".
+But any non-empty string means that the flag is set.  An empty string means
+that the flag is not set.  't_CS' works like this too, but it isn't a termcap
+flag.
 
 OUTPUT CODES
        option  meaning ~
@@ -281,6 +282,9 @@ OUTPUT CODES
        t_vs    cursor very visible                             *t_vs* *'t_vs'*
                                                                *t_xs* *'t_xs'*
        t_xs    if non-empty, standout not erased by overwriting (hpterm)
+                                                               *t_xn* *'t_xn'*
+       t_xn    if non-empty, character writing at the last cell of screen
+               didn't causes scrolling
        t_ZH    italics mode                                    *t_ZH* *'t_ZH'*
        t_ZR    italics end                                     *t_ZR* *'t_ZR'*
 
index 1ba08f7e6fc848b0b736a9d56440fd2f95d97f20..d9cfda0f0d2ede775a76734bc7ba5f63a1f20c40 100644 (file)
@@ -2978,6 +2978,7 @@ static struct vimoption
     p_term("t_WS", T_CWS)
     p_term("t_SI", T_CSI)
     p_term("t_EI", T_CEI)
+    p_term("t_xn", T_XN)
     p_term("t_xs", T_XS)
     p_term("t_ZH", T_CZH)
     p_term("t_ZR", T_CZR)
index 2ebd98beea08229166e72aa40694b0859ae98c4d..f735552b0468b696cb281120693663d05b25ed98 100644 (file)
@@ -7968,9 +7968,11 @@ screen_char(off, row, col)
     if (row >= screen_Rows || col >= screen_Columns)
        return;
 
-    /* Outputting the last character on the screen may scrollup the screen.
-     * Don't to it!  Mark the character invalid (update it when scrolled up) */
-    if (row == screen_Rows - 1 && col == screen_Columns - 1
+    /* Outputting a character in the last cell on the screen may scroll the
+     * screen up.  Only do it when the "xn" termcap property is set, otherwise
+     * mark the character invalid (update it when scrolled up). */
+    if (*T_XN == NUL
+           && row == screen_Rows - 1 && col == screen_Columns - 1
 #ifdef FEAT_RIGHTLEFT
            /* account for first command-line character in rightleft mode */
            && !cmdmsg_rl
index a1ab537295675bc8c23c1603d1d3af6b55423d46..0d797bcd668797403ee44bd9aa9d329d687f989b 100644 (file)
@@ -200,6 +200,7 @@ static struct builtin_term builtin_termcaps[] =
     {(int)KS_VB,       IF_EB("\033|f", ESC_STR "|f")},
     {(int)KS_MS,       "y"},
     {(int)KS_UT,       "y"},
+    {(int)KS_XN,       "y"},
     {(int)KS_LE,       "\b"},          /* cursor-left = BS */
     {(int)KS_ND,       "\014"},        /* cursor-right = CTRL-L */
 # ifdef TERMINFO
@@ -658,6 +659,7 @@ static struct builtin_term builtin_termcaps[] =
 
     {(int)KS_MS,       "y"},           /* save to move cur in reverse mode */
     {(int)KS_UT,       "y"},
+    {(int)KS_XN,       "y"},
     {(int)KS_LE,       "\b"},
 #  ifdef TERMINFO
     {(int)KS_CM,       "\033|%i%p1%d;%p2%dH"},/* cursor motion */
@@ -772,6 +774,7 @@ static struct builtin_term builtin_termcaps[] =
     {(int)KS_CSF,      IF_EB("\033[101;%dm", ESC_STR "[101;%dm")},     /* set screen foreground color */
     {(int)KS_MS,       "y"},
     {(int)KS_UT,       "y"},
+    {(int)KS_XN,       "y"},
     {(int)KS_LE,       "\b"},
 #  ifdef TERMINFO
     {(int)KS_CM,       IF_EB("\033[%i%p1%d;%p2%dH",
@@ -1207,6 +1210,7 @@ static struct builtin_term builtin_termcaps[] =
     {(int)KS_UCS,      "[UCS]"},
     {(int)KS_MS,       "[MS]"},
     {(int)KS_UT,       "[UT]"},
+    {(int)KS_XN,       "[XN]"},
 #  ifdef TERMINFO
     {(int)KS_CM,       "[%p1%dCM%p2%d]"},
 #  else
@@ -1645,6 +1649,9 @@ set_termname(term)
                if ((T_XS == NULL || T_XS == empty_option)
                                                        && tgetflag("xs") > 0)
                    T_XS = (char_u *)"y";
+               if ((T_XN == NULL || T_XN == empty_option)
+                                                       && tgetflag("xn") > 0)
+                   T_XN = (char_u *)"y";
                if ((T_DB == NULL || T_DB == empty_option)
                                                        && tgetflag("db") > 0)
                    T_DB = (char_u *)"y";
index 22b60b1335a182750294ce196ac4aa4eb4beb364..28390a285cf2422d1a38b848675ed68039573347 100644 (file)
@@ -66,6 +66,7 @@ enum SpecialKey
     KS_CSF,    /* set foreground color */
     KS_CSB,    /* set background color */
     KS_XS,     /* standout not erased by overwriting (hpterm) */
+    KS_XN,     /* newline glitch */
     KS_MB,     /* blink mode */
     KS_CAF,    /* set foreground color (ANSI) */
     KS_CAB,    /* set background color (ANSI) */
@@ -144,6 +145,7 @@ extern char_u *(term_strings[]);    /* current terminal strings */
 #define T_CSF  (term_str(KS_CSF))      /* set foreground color */
 #define T_CSB  (term_str(KS_CSB))      /* set background color */
 #define T_XS   (term_str(KS_XS))       /* standout not erased by overwriting */
+#define T_XN   (term_str(KS_XN))       /* newline glitch */
 #define T_MB   (term_str(KS_MB))       /* blink mode */
 #define T_CAF  (term_str(KS_CAF))      /* set foreground color (ANSI) */
 #define T_CAB  (term_str(KS_CAB))      /* set background color (ANSI) */
index 8ef229acb9259f7c27d69d85e99b152828dfc6de..9a813d7ba15d6fcd37de29b74052552c9d793dde 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    627,
 /**/
     626,
 /**/