Minor edits, whitespace fixes, etc.

darcs-hash:20061120131412-ac50b-0d9bc9d3fb35b4c9831bdf3a606e9aa8df844478.gz
This commit is contained in:
axel 2006-11-20 23:14:12 +10:00
parent bc1efb1556
commit 125ca9ff73
2 changed files with 9 additions and 9 deletions

View File

@ -1416,7 +1416,7 @@ static void handle_token_history( int forward, int reset )
else else
{ {
debug( 3, L"new '%ls'", data->token_history_buff ); //debug( 3, L"new '%ls'", data->token_history_buff );
for( tok_init( &tok, data->token_history_buff, TOK_ACCEPT_UNFINISHED ); for( tok_init( &tok, data->token_history_buff, TOK_ACCEPT_UNFINISHED );
tok_has_next( &tok); tok_has_next( &tok);
@ -1428,12 +1428,12 @@ static void handle_token_history( int forward, int reset )
{ {
if( wcsstr( tok_last( &tok ), data->search_buff ) ) if( wcsstr( tok_last( &tok ), data->search_buff ) )
{ {
debug( 3, L"Found token at pos %d\n", tok_get_pos( &tok ) ); //debug( 3, L"Found token at pos %d\n", tok_get_pos( &tok ) );
if( tok_get_pos( &tok ) >= current_pos ) if( tok_get_pos( &tok ) >= current_pos )
{ {
break; break;
} }
debug( 3, L"ok pos" ); //debug( 3, L"ok pos" );
if( !contains( tok_last( &tok ), &data->search_prev ) ) if( !contains( tok_last( &tok ), &data->search_prev ) )
{ {
@ -2021,7 +2021,7 @@ wchar_t *reader_readline()
/* set the new modes */ /* set the new modes */
if( tcsetattr(0,TCSANOW,&shell_modes)) if( tcsetattr(0,TCSANOW,&shell_modes))
{ {
wperror(L"tcsetattr"); wperror(L"tcsetattr");
} }
while( !finished && !data->end_loop) while( !finished && !data->end_loop)

View File

@ -6,9 +6,9 @@ function __fish_print_help -d (N_ "Print help message for the specified fish fun
set -l cmd2 s/'\(.\)'\x08_/(set_color --underline)\\1(set_color normal)/g set -l cmd2 s/'\(.\)'\x08_/(set_color --underline)\\1(set_color normal)/g
# This expression should take care of bold characters. It's not # This expression should take care of bold characters. It's not
# waterproof, since it doesn't check that the same character is # waterproof, since it doesn't check that the same character is
# used both before and after the backspace, since regular # used both before and after the backspace, since regular
# languages don't allow backreferences. # languages don't allow backreferences.
set -l cmd3 s/.\x08'\(.\)'/(set_color --bold)\\1(set_color normal)/g set -l cmd3 s/.\x08'\(.\)'/(set_color --bold)\\1(set_color normal)/g
# Combine all expressions in a single variable # Combine all expressions in a single variable
@ -22,6 +22,6 @@ function __fish_print_help -d (N_ "Print help message for the specified fish fun
echo echo
# Filter and print help # Filter and print help
printf "%s\n" $help| tail -n (expr $lines - 5 ) | head -n (expr $lines - 8) | sed $sed_cmd printf "%s\n" $help| tail -n (expr $lines - 5) | head -n (expr $lines - 8) | sed $sed_cmd
end end