Fix for weird issues when a line becomes very long introduced by my warning fixes

This commit is contained in:
ridiculousfish 2012-08-04 18:32:15 -07:00
parent 4906609dd9
commit 35e9fd1bb0

View file

@ -707,9 +707,9 @@ static void s_update( screen_t *scr, const wchar_t *prompt )
for ( ; j < o_line.size(); j++) for ( ; j < o_line.size(); j++)
{ {
int width = fish_wcwidth(o_line.char_at(j)); int width = fish_wcwidth(o_line.char_at(j));
skip_remaining -= width; if (skip_remaining <= width)
if (skip_remaining <= 0)
break; break;
skip_remaining -= width;
current_width += width; current_width += width;
} }