From 48fbe3d0e1b889f49b288d1865e164ebbe8a4a5b Mon Sep 17 00:00:00 2001 From: Keith Winstein Date: Sat, 5 May 2012 01:44:51 -0400 Subject: [PATCH] Correctly handle wrapped lines where first portion is blank --- src/terminal/terminaldisplay.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/terminal/terminaldisplay.cc b/src/terminal/terminaldisplay.cc index 468c425..db9d9fb 100644 --- a/src/terminal/terminaldisplay.cc +++ b/src/terminal/terminaldisplay.cc @@ -203,8 +203,11 @@ std::string Display::new_frame( bool initialized, const Framebuffer &last, const if ( (frame.y < f.ds.get_height() - 1) && f.get_row( frame.y )->get_wrap() ) { frame.x = last_x; - frame.force_next_put = true; - put_cell( initialized, frame, f ); + + while ( frame.x < f.ds.get_width() ) { + frame.force_next_put = true; + put_cell( initialized, frame, f ); + } /* next write will wrap */ frame.cursor_x = 0;