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.
master
David Lawrence Ramsey 2017-08-17 02:02:31 -05:00 committed by Benno Schulenberg
parent f08d169aa1
commit e09dbf18b1
1 changed files with 2 additions and 1 deletions

View File

@ -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])