diff --git a/ChangeLog b/ChangeLog index 9a79c358270ec4c94d316fc93bfef07c9b5cefb7..5e68a2755a64180c0944f6cff67e3494414aef3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -318,6 +318,10 @@ CVS code - display_string() - Instead of using parse_mbchar()'s bad_chr parameter, use mbrep() to get the representation of a bad character. (DLR) + - If column is less than start_col and the character's a tab, + which can be possible if there are enough tabs and the + terminal size is sufficiently large, don't try to display it + using control_mbrep(). (DLR, found by Duncan G. Doyle) edit_redraw(), edit_refresh() - Clean up and simplify. (DLR) edit_update() diff --git a/src/winio.c b/src/winio.c index 05b69f384ce4e4e899dd048cf01d28cdd722ec80..1bd633e91e7e8b33ae4cd985f3f0d1c12b83f8f7 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2335,8 +2335,8 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool converted = charalloc(alloc_len + 1); index = 0; - if (column < start_col || (dollars && column > 0 && - buf[start_index] != '\t')) { + if (buf[start_index] != '\t' && (column < start_col || (dollars && + column > 0))) { /* We don't display all of buf[start_index] since it starts to * the left of the screen. */ buf_mb_len = parse_mbchar(buf + start_index, buf_mb, NULL);