diff options
| author | Simon Ruderich <simon@ruderich.org> | 2010-10-02 15:27:57 +0000 | 
|---|---|---|
| committer | Simon Ruderich <simon@ruderich.org> | 2010-10-02 15:27:57 +0000 | 
| commit | 8f2bd0ac21b64271a2ac9eb934ca4cc5dfe956f7 (patch) | |
| tree | 1b22999f13780f2863ac83a3627028d9874cc79d | |
| parent | vim_mode: Add text-object aW. (diff) | |
| download | irssi-scripts-8f2bd0ac21b64271a2ac9eb934ca4cc5dfe956f7.tar.gz irssi-scripts-8f2bd0ac21b64271a2ac9eb934ca4cc5dfe956f7.zip | |
vim_mode: Fix history with /set vim_mode_utf8 on.
| -rw-r--r-- | vim-mode/vim_mode.pl | 14 | 
1 files changed, 12 insertions, 2 deletions
| diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 2adcdc9..117d639 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -529,7 +529,12 @@ sub cmd_movement_j {          _input_pos($history_pos);          $history_index = $#history + 1;      } elsif ($history_index >= 0) { -        _input($history[$history_index]); +        my $history = $history[$history_index]; +        # History is not in UTF-8! +        if ($utf8) { +            $history = decode_utf8($history); +        } +        _input($history);          _input_pos(0);      }      return; @@ -556,7 +561,12 @@ sub cmd_movement_k {      }      print "History Index: $history_index" if DEBUG;      if ($history_index >= 0) { -        _input($history[$history_index]); +        my $history = $history[$history_index]; +        # History is not in UTF-8! +        if ($utf8) { +            $history = decode_utf8($history); +        } +        _input($history);          _input_pos(0);      }      return; | 
