Skip to content

Commit

Permalink
Fix tab output bug
Browse files Browse the repository at this point in the history
Increment the column counter prior decrementing the calculated width of
the tab.

Regression introduced in commit 369350b (Calculate the width of each
displayed character).
  • Loading branch information
mptre committed Apr 20, 2017
1 parent 9eb2ca7 commit db2d9f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pick.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,11 +690,13 @@ print_line(const char *str, size_t len, int standout,
width = 8 - (col & 7); /* ceil to multiple of 8 */
if (col + width > columns)
break;
col += width;

for (; width > 0; width--)
if (tty_putc(' ') == ERR)
err(1, "tty_putc");

i++, col += width;
i++;
continue;
}

Expand Down

0 comments on commit db2d9f4

Please sign in to comment.