aboutsummaryrefslogtreecommitdiffstats
path: root/vim-mode/vim_mode.pl
diff options
context:
space:
mode:
authorSimon Ruderich <simon@ruderich.org>2010-10-02 15:27:57 +0000
committerSimon Ruderich <simon@ruderich.org>2010-10-02 15:27:57 +0000
commit8f2bd0ac21b64271a2ac9eb934ca4cc5dfe956f7 (patch)
tree1b22999f13780f2863ac83a3627028d9874cc79d /vim-mode/vim_mode.pl
parentvim_mode: Add text-object aW. (diff)
downloadirssi-scripts-8f2bd0ac21b64271a2ac9eb934ca4cc5dfe956f7.tar.gz
irssi-scripts-8f2bd0ac21b64271a2ac9eb934ca4cc5dfe956f7.zip
vim_mode: Fix history with /set vim_mode_utf8 on.
Diffstat (limited to 'vim-mode/vim_mode.pl')
-rw-r--r--vim-mode/vim_mode.pl14
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;