diff options
| author | Simon Ruderich <simon@ruderich.org> | 2010-10-01 18:55:44 +0000 | 
|---|---|---|
| committer | Simon Ruderich <simon@ruderich.org> | 2010-10-01 18:55:44 +0000 | 
| commit | f3b427631ba1d64ed304ed206c9e05ae0c441e0d (patch) | |
| tree | b2fc0361abf5cbb0e85785f844ecd59ed9bb3137 | |
| parent | vim_mode: First work on text-objects. (diff) | |
| download | irssi-scripts-f3b427631ba1d64ed304ed206c9e05ae0c441e0d.tar.gz irssi-scripts-f3b427631ba1d64ed304ed206c9e05ae0c441e0d.zip | |
vim_mode: Fix W between words.
| -rw-r--r-- | vim-mode/vim_mode.pl | 7 | 
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); | 
