aboutsummaryrefslogtreecommitdiffstats
path: root/vim-mode
diff options
context:
space:
mode:
Diffstat (limited to 'vim-mode')
-rw-r--r--vim-mode/vim_mode.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl
index e861c71..9d3314d 100644
--- a/vim-mode/vim_mode.pl
+++ b/vim-mode/vim_mode.pl
@@ -741,6 +741,13 @@ sub cmd_movement_E {
sub _beginning_of_WORD {
my ($input, $count, $pos) = @_;
+ # Necessary for correct movement between two words with only one
+ # whitespace.
+ if (substr($input, $pos) =~ /^\s\S/) {
+ $pos++;
+ $count--;
+ }
+
while ($count-- > 0 and length($input) > $pos) {
if (substr($input, $pos + 1) !~ /\s+/) {
return length($input);