# HG changeset patch # User Bram Moolenaar # Date 1571931905 -7200 # Node ID 9f7a2cfabfba013c4d9f964829350c00a17b5f0a # Parent 089d9b0658cc76b989e33228eb97cb24b0827551 patch 8.1.2208: Unix: Tabs in output might be expanded to spaces Commit: https://github.com/vim/vim/commit/faf626e5d1ca128e4bf943c4e505f08d428ed77e Author: Bram Moolenaar Date: Thu Oct 24 17:43:25 2019 +0200 patch 8.1.2208: Unix: Tabs in output might be expanded to spaces Problem: Unix: Tabs in output might be expanded to spaces. Solution: Reset the XTABS flag. (closes https://github.com/vim/vim/issues/5108) diff --git a/src/os_unix.c b/src/os_unix.c --- 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 - tnew.c_cc[VMIN] = 1; /* return after 1 char */ - tnew.c_cc[VTIME] = 0; /* don't wait */ +# endif +# endif +# endif + 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 --- 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,