From 35e9fd1bb0602ac5d795f2dae83139f040f2bbfe Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 4 Aug 2012 18:32:15 -0700 Subject: [PATCH] Fix for weird issues when a line becomes very long introduced by my warning fixes --- screen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/screen.cpp b/screen.cpp index 8abb56bd0..c0ca4fc16 100644 --- a/screen.cpp +++ b/screen.cpp @@ -707,9 +707,9 @@ static void s_update( screen_t *scr, const wchar_t *prompt ) for ( ; j < o_line.size(); j++) { int width = fish_wcwidth(o_line.char_at(j)); - skip_remaining -= width; - if (skip_remaining <= 0) + if (skip_remaining <= width) break; + skip_remaining -= width; current_width += width; }