mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 10:01:14 -03:00
Detect and handle terminals size changes
darcs-hash:20061004214502-ac50b-aaf5b76a6281c0ba8757e794b0a802793ce92916.gz
This commit is contained in:
8
screen.c
8
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 );
|
||||
|
||||
Reference in New Issue
Block a user