mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-23 21:31:14 -03:00
If the builtin help won't fit on-screen, and it can't be shortened, don't print it
darcs-hash:20061025203225-ac50b-8675f297a8aabea080edf7946d6f136296a6d7bb.gz
This commit is contained in:
@@ -225,6 +225,7 @@ static void builtin_print_help( wchar_t *cmd, string_buffer_t *b )
|
||||
if( lines > 2*screen_height/3 )
|
||||
{
|
||||
wchar_t *pos;
|
||||
int cut=0;
|
||||
|
||||
/* Find first empty line */
|
||||
for( pos=str; *pos; pos++ )
|
||||
@@ -248,9 +249,16 @@ static void builtin_print_help( wchar_t *cmd, string_buffer_t *b )
|
||||
if( is_empty )
|
||||
{
|
||||
*(pos+1)=L'\0';
|
||||
cut = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( !cut )
|
||||
{
|
||||
*str = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user