mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Fix issue with ^W and other shortcurs sometimes not deleting anything
darcs-hash:20060916230532-ac50b-395d34e2c67d2be3d634638265a98239442fd6cd.gz
This commit is contained in:
parent
4399503f4e
commit
6be3807cae
1 changed files with 21 additions and 6 deletions
21
reader.c
21
reader.c
|
@ -2007,6 +2007,9 @@ static void move_word( int dir, int erase )
|
|||
end_buff_pos--;
|
||||
}
|
||||
|
||||
/*
|
||||
Remove all whitespace characters before finding a word
|
||||
*/
|
||||
while( 1 )
|
||||
{
|
||||
wchar_t c;
|
||||
|
@ -2022,16 +2025,28 @@ static void move_word( int dir, int erase )
|
|||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
Always eat at least one character
|
||||
*/
|
||||
if( end_buff_pos != data->buff_pos )
|
||||
{
|
||||
|
||||
c = data->buff[end_buff_pos];
|
||||
|
||||
if( !iswspace( c ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
end_buff_pos+=step;
|
||||
}
|
||||
|
||||
end_buff_pos+=step;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
Remove until we find a character that is not alphanumeric
|
||||
*/
|
||||
while( 1 )
|
||||
{
|
||||
wchar_t c;
|
||||
|
@ -2056,7 +2071,7 @@ static void move_word( int dir, int erase )
|
|||
whitespace, but do for all other non-alphabetic
|
||||
characters
|
||||
*/
|
||||
if( iswspace( c ) )
|
||||
if( iswspace( c ) /* && ( abs( end_buff_pos-data->buff_pos ) > 1 ) */)
|
||||
end_buff_pos -= step;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue