Merge branch '3754_helpviewer_tabs'

* 3754_helpviewer_tabs:
  Ticket #3754: Help viewer doesn't handle tabs correctly.
This commit is contained in:
Mooffie 2017-02-23 20:55:44 +02:00
commit 1db93c1b60

View File

@ -531,18 +531,22 @@ help_show (WDialog * h, const char *paint_start)
line++; line++;
col = 0; col = 0;
break; break;
case '\t':
col = (col / 8 + 1) * 8;
if (col >= HELP_WINDOW_WIDTH)
{
line++;
col = 8;
}
break;
case ' ': case ' ':
case '\t':
/* word delimiter */ /* word delimiter */
if (painting) if (painting)
help_print_word (h, word, &col, &line, TRUE); {
help_print_word (h, word, &col, &line, c == ' ');
if (c == '\t')
{
col = (col / 8 + 1) * 8;
if (col >= HELP_WINDOW_WIDTH)
{
line++;
col = 8;
}
}
}
break; break;
default: default:
if (painting && (line < help_lines)) if (painting && (line < help_lines))