commit 9f6c3a6269cc7a4bc754a3ca4d1252c0a5c9c664
parent 62737687972bac7b9888820dd407f5ff073542eb
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 14 Aug 2017 11:39:29 +0200
display: don't doubly show tabs that cross a chunk boundary
This fixes https://savannah.gnu.org/bugs/?51669.
Reported-by: David Lawrence Ramsey <pooka109@gmail.com>
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/winio.c b/src/winio.c
@@ -1906,7 +1906,8 @@ char *display_string(const char *buf, size_t column, size_t span, bool isdata)
} else if (*buf == '\t') {
/* Show a tab as a visible character, or as as a space. */
#ifndef NANO_TINY
- if (ISSET(WHITESPACE_DISPLAY)) {
+ if (ISSET(WHITESPACE_DISPLAY) && (index > 0 || !isdata ||
+ !ISSET(SOFTWRAP) || column % tabsize == 0)) {
int i = 0;
while (i < whitespace_len[0])