diff options
author | 2006-10-05 07:45:02 +1000 | |
---|---|---|
committer | 2006-10-05 07:45:02 +1000 | |
commit | d1078f8582bff8365d233664458c509305350f5c (patch) | |
tree | 2c6779215cece3b16c24453127a206e7b4cc3fde /screen.c | |
parent | 0ea668b260bcb640de7bdcb3feff4f7d9187e32c (diff) |
Detect and handle terminals size changes
darcs-hash:20061004214502-ac50b-aaf5b76a6281c0ba8757e794b0a802793ce92916.gz
Diffstat (limited to 'screen.c')
-rw-r--r-- | screen.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 ); |