From e09dbf18b15d6431c5edfce2de0fa695b7d88f83 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Thu, 17 Aug 2017 02:02:31 -0500 Subject: [PATCH] display: do show the visible character for a tab when it starts a row Regardless of whether the row start is at a multiple of the tab size. This completes the fix for https://savannah.gnu.org/bugs/?51669. --- src/winio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/winio.c b/src/winio.c index 4395db70..3e40cc9a 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1907,7 +1907,8 @@ char *display_string(const char *buf, size_t column, size_t span, bool isdata) /* Show a tab as a visible character, or as as a space. */ #ifndef NANO_TINY if (ISSET(WHITESPACE_DISPLAY) && (index > 0 || !isdata || - !ISSET(SOFTWRAP) || column % tabsize == 0)) { + !ISSET(SOFTWRAP) || column % tabsize == 0 || + column == start_col)) { int i = 0; while (i < whitespace_len[0])