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>
master
Benno Schulenberg 2017-08-14 11:39:29 +02:00
parent 6273768797
commit 9f6c3a6269
1 changed files with 2 additions and 1 deletions

View File

@ -1906,7 +1906,8 @@ char *display_string(const char *buf, size_t column, size_t span, bool isdata)
} else if (*buf == '\t') { } else if (*buf == '\t') {
/* Show a tab as a visible character, or as as a space. */ /* Show a tab as a visible character, or as as a space. */
#ifndef NANO_TINY #ifndef NANO_TINY
if (ISSET(WHITESPACE_DISPLAY)) { if (ISSET(WHITESPACE_DISPLAY) && (index > 0 || !isdata ||
!ISSET(SOFTWRAP) || column % tabsize == 0)) {
int i = 0; int i = 0;
while (i < whitespace_len[0]) while (i < whitespace_len[0])