diff options
| author | Simon Ruderich <simon@ruderich.org> | 2010-09-26 23:14:01 +0000 | 
|---|---|---|
| committer | Simon Ruderich <simon@ruderich.org> | 2010-09-26 23:14:01 +0000 | 
| commit | 4ef6cab66ed2fccc0f9ded17545ecc7b4c3c97ba (patch) | |
| tree | cfaaac571d660267e5da93db2208fa9747b6e2c0 | |
| parent | vim_mode: Correctly handle multiple whitespace between words. (diff) | |
| download | irssi-scripts-4ef6cab66ed2fccc0f9ded17545ecc7b4c3c97ba.tar.gz irssi-scripts-4ef6cab66ed2fccc0f9ded17545ecc7b4c3c97ba.zip  | |
vim_mode: Fix _end_of_WORD() when called at the end of the line.
| -rw-r--r-- | vim-mode/vim_mode.pl | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index d1dde46..416b753 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -443,6 +443,8 @@ sub cmd_movement_E {  sub _end_of_WORD {      my ($input, $count, $pos) = @_; +    return $pos if $pos >= length($input); +      # We are inside a word, skip to the end of it.      if (substr($input, $pos + 1) =~ /^\S+(\s)/) {          $pos += $-[1];  | 
