mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 08:51:14 -03:00
Increase size of buffer for parser error string. Should change this to a dynamically allocated string.
darcs-hash:20060531154028-ac50b-ada120ecfe65bcf1ad1b3d1a5fad41ae9dec133c.gz
This commit is contained in:
10
common.c
10
common.c
@@ -547,9 +547,10 @@ void debug( int level, const wchar_t *msg, ... )
|
||||
|
||||
sb_init( &sb );
|
||||
sb_init( &sb2 );
|
||||
va_start( va, msg );
|
||||
|
||||
|
||||
sb_printf( &sb, L"%ls: ", program_name );
|
||||
|
||||
va_start( va, msg );
|
||||
sb_vprintf( &sb, msg, va );
|
||||
va_end( va );
|
||||
|
||||
@@ -581,7 +582,7 @@ void write_screen( const wchar_t *msg, string_buffer_t *buff )
|
||||
*/
|
||||
while( *pos && ( !wcschr( L" \n\r\t", *pos ) ) )
|
||||
{
|
||||
|
||||
|
||||
/*
|
||||
Check is token is wider than one line.
|
||||
If so we mark it as an overflow and break the token.
|
||||
@@ -606,7 +607,7 @@ void write_screen( const wchar_t *msg, string_buffer_t *buff )
|
||||
else if( overflow )
|
||||
{
|
||||
/*
|
||||
In case of overflow, we print a newline, except if we alreade are at position 0
|
||||
In case of overflow, we print a newline, except if we already are at position 0
|
||||
*/
|
||||
wchar_t *token = wcsndup( start, pos-start );
|
||||
if( line_width != 0 )
|
||||
@@ -630,6 +631,7 @@ void write_screen( const wchar_t *msg, string_buffer_t *buff )
|
||||
free( token );
|
||||
line_width += (line_width!=0?1:0) + tok_width;
|
||||
}
|
||||
|
||||
/*
|
||||
Break on end of string
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user