aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader.cpp
diff options
context:
space:
mode:
authorGravatar Ian Munsie <darkstarsword@gmail.com>2012-06-22 13:27:22 +1000
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-07-01 15:37:10 -0700
commit2b24eab26af24527e3c1841e511aa6999fd1f23e (patch)
tree30385eeb253806fb780fb73391bde03d55448d4c /reader.cpp
parent7bbc7a61cee641acd7c7ef612e2530c584bbe7a8 (diff)
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>
Diffstat (limited to 'reader.cpp')
-rw-r--r--reader.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/reader.cpp b/reader.cpp
index 9b2960cc..db8ba2a6 100644
--- a/reader.cpp
+++ b/reader.cpp
@@ -2001,14 +2001,6 @@ static void move_word( int dir, int erase, int newv )
}
/*
- When moving left, ignore the character under the cursor
- */
- if( !dir )
- {
- end_buff_pos+=2*step;
- }
-
- /*
Remove all whitespace characters before finding a word
*/
while( 1 )