mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 15:05:27 +08:00
Fix off by two in move_word left
This can be demonstrated with something like: echo howdy hi<control-w> echo howdy I<alt-b> Previousely this would delete/move all the way to the start of 'howdy', rather than just the word 'hi'/'I'. It seems that the code to ignore the character under the cursor was redundant, as all the cases I've tried with it removed seem to do the right thing. Signed-off-by: Ian Munsie <darkstarsword@gmail.com>
This commit is contained in:
parent
7bbc7a61ce
commit
2b24eab26a
@ -2000,14 +2000,6 @@ static void move_word( int dir, int erase, int newv )
|
||||
end_buff_pos--;
|
||||
}
|
||||
|
||||
/*
|
||||
When moving left, ignore the character under the cursor
|
||||
*/
|
||||
if( !dir )
|
||||
{
|
||||
end_buff_pos+=2*step;
|
||||
}
|
||||
|
||||
/*
|
||||
Remove all whitespace characters before finding a word
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user