Fix bug involving wraparound copy-and-paste to a blank line.

Identified by Anders Kaseorg.

Test case:

( reset; seq 100; printf 'Hello, world!'; sleep 1;
printf '\t\t\t\t\t\t\t\t\t\t   \r\e[K'; sleep 1; printf '\n' )
> /dev/pts/16 2>&1

(replace /dev/pts/16 with mosh or termemu terminal)
This commit is contained in:
Keith Winstein
2012-04-11 02:40:18 -04:00
parent 4144f2e4f0
commit b4c47b77cf
2 changed files with 18 additions and 4 deletions
+2
View File
@@ -26,6 +26,7 @@ namespace Terminal {
class FrameState {
public:
int x, y;
bool force_next_put;
std::string str;
int cursor_x, cursor_y;
@@ -35,6 +36,7 @@ namespace Terminal {
FrameState( const Framebuffer &s_last )
: x(0), y(0),
force_next_put( false ),
str(), cursor_x(0), cursor_y(0), current_rendition( 0 ),
last_frame( s_last )
{