terminal: Fix tab expansion

This commit is contained in:
Kristian Høgsberg 2012-06-20 15:56:13 -04:00
parent 82cd36bfff
commit cca3c2f9da
1 changed files with 1 additions and 1 deletions

View File

@ -1765,13 +1765,13 @@ handle_special_char(struct terminal *terminal, char c)
break;
case '\t':
while (terminal->column < terminal->width) {
if (terminal->tab_ruler[terminal->column]) break;
if (terminal->mode & MODE_IRM)
terminal_shift_line(terminal, +1);
row[terminal->column].byte[0] = ' ';
row[terminal->column].byte[1] = '\0';
attr_row[terminal->column] = terminal->curr_attr;
terminal->column++;
if (terminal->tab_ruler[terminal->column]) break;
}
if (terminal->column >= terminal->width) {
terminal->column = terminal->width - 1;