aboutsummaryrefslogtreecommitdiffhomepage
path: root/screen.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-10-05 07:45:02 +1000
committerGravatar axel <axel@liljencrantz.se>2006-10-05 07:45:02 +1000
commitd1078f8582bff8365d233664458c509305350f5c (patch)
tree2c6779215cece3b16c24453127a206e7b4cc3fde /screen.c
parent0ea668b260bcb640de7bdcb3feff4f7d9187e32c (diff)
Detect and handle terminals size changes
darcs-hash:20061004214502-ac50b-aaf5b76a6281c0ba8757e794b0a802793ce92916.gz
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/screen.c b/screen.c
index a1e207b7..22287261 100644
--- a/screen.c
+++ b/screen.c
@@ -490,10 +490,18 @@ static void s_update( screen_t *scr, wchar_t *prompt )
int i, j, k;
int prompt_width = calc_prompt_width( prompt );
int current_width=0;
+ int screen_width = common_get_width();
buffer_t output;
b_init( &output );
+ if( scr->actual_width != screen_width )
+ {
+ s_move( scr, &output, 0, 0 );
+ scr->actual_width = screen_width;
+ s_reset( scr );
+ }
+
if( wcscmp( prompt, (wchar_t *)scr->actual_prompt.buff ) )
{
s_move( scr, &output, 0, 0 );