]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.1.2208: Unix: Tabs in output might be expanded to spaces v8.1.2208
authorBram Moolenaar <Bram@vim.org>
Thu, 24 Oct 2019 15:43:25 +0000 (17:43 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 24 Oct 2019 15:43:25 +0000 (17:43 +0200)
Problem:    Unix: Tabs in output might be expanded to spaces.
Solution:   Reset the XTABS flag. (closes #5108)

src/os_unix.c
src/version.c

index e518bb91fcdfde1ec92ee6afa2e1d6bc1f31aad7..a3c09f75eb18c04e823863d6585f8ac67f74c5b6 100644 (file)
@@ -2201,9 +2201,9 @@ mch_settitle(char_u *title, char_u *icon)
 
        if (*T_CIS != NUL)
        {
-           out_str(T_CIS);                     /* set icon start */
+           out_str(T_CIS);                     // set icon start
            out_str_nf(icon);
-           out_str(T_CIE);                     /* set icon end */
+           out_str(T_CIE);                     // set icon end
            out_flush();
        }
 #ifdef FEAT_X11
@@ -3456,11 +3456,21 @@ mch_settmode(int tmode)
                                    /* but it breaks function keys on MINT */
 # endif
                                );
-# ifdef ONLCR      /* don't map NL -> CR NL, we do it ourselves */
+# ifdef ONLCR
+       // Don't map NL -> CR NL, we do it ourselves.
+       // Also disable expanding tabs if possible.
+#  ifdef XTABS
+       tnew.c_oflag &= ~(ONLCR | XTABS);
+#  else
+#   ifdef TAB3
+       tnew.c_oflag &= ~(ONLCR | TAB3);
+#   else
        tnew.c_oflag &= ~ONLCR;
+#   endif
+#  endif
 # endif
-       tnew.c_cc[VMIN] = 1;            /* return after 1 char */
-       tnew.c_cc[VTIME] = 0;           /* don't wait */
+       tnew.c_cc[VMIN] = 1;            // return after 1 char
+       tnew.c_cc[VTIME] = 0;           // don't wait
     }
     else if (tmode == TMODE_SLEEP)
     {
index 91cdf338a30d274e5b497010a8db9e4dacd55096..64cae46f9c5a50a8b5ae0f3e1d553abc13001d70 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2208,
 /**/
     2207,
 /**/