diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-10-24 17:43:25 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-10-24 17:43:25 +0200 |
commit | faf626e5d1ca128e4bf943c4e505f08d428ed77e (patch) | |
tree | ab6152b046b5d95d86283278f97684aaa5157cc9 | |
parent | edaad6e0a0e3c1fcb6a5c2771e647c52475bb19c (diff) | |
download | vim-git-faf626e5d1ca128e4bf943c4e505f08d428ed77e.tar.gz |
patch 8.1.2208: Unix: Tabs in output might be expanded to spacesv8.1.2208
Problem: Unix: Tabs in output might be expanded to spaces.
Solution: Reset the XTABS flag. (closes #5108)
-rw-r--r-- | src/os_unix.c | 20 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 17 insertions, 5 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index e518bb91f..a3c09f75e 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -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) { diff --git a/src/version.c b/src/version.c index 91cdf338a..64cae46f9 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2208, +/**/ 2207, /**/ 2206, |