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 #5108)
diff --git a/src/os_unix.c b/src/os_unix.c
index e518bb9..a3c09f7 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -2201,9 +2201,9 @@
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 @@
/* 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 91cdf33..64cae46 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2208,
+/**/
2207,
/**/
2206,