From 0293e579d2bd82942158e7d4e0b7705cf9a66491 Mon Sep 17 00:00:00 2001 From: Keith Winstein Date: Mon, 16 Apr 2012 09:55:59 -0400 Subject: [PATCH] Properly reset tab stops on resize --- src/terminal/terminalframebuffer.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/terminal/terminalframebuffer.cc b/src/terminal/terminalframebuffer.cc index 1a8a06c..541479d 100644 --- a/src/terminal/terminalframebuffer.cc +++ b/src/terminal/terminalframebuffer.cc @@ -366,7 +366,11 @@ void DrawState::resize( int s_width, int s_height ) snap_cursor_to_border(); - tabs.clear(); + /* reset tab stops */ + tabs = std::vector< bool >( width ); + for ( int i = 0; i < width; i++ ) { + tabs[ i ] = ( (i % 8) == 0 ); + } /* saved cursor will be snapped to border on restore */