diff options
author | Tom Feist <shabble@metavore.org> | 2010-09-26 15:40:48 +0000 |
---|---|---|
committer | Tom Feist <shabble@metavore.org> | 2010-09-26 15:40:48 +0000 |
commit | c04c2f7114d9181ea34c73870298b32e8792b565 (patch) | |
tree | 68aac20f0e58c8954d1b8ea68b91e25c934409a7 /vim-mode/vim_mode.pl | |
parent | vim_mode: Add missing documentation for y p P. (diff) | |
download | irssi-scripts-c04c2f7114d9181ea34c73870298b32e8792b565.tar.gz irssi-scripts-c04c2f7114d9181ea34c73870298b32e8792b565.zip |
added version test to history motion to avoid erroring on older versions that
don't have history_get_lines()
Diffstat (limited to '')
-rw-r--r-- | vim-mode/vim_mode.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 27210f6..ed79f61 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -3,7 +3,8 @@ # Currently supported features: # # * Insert/Command mode. Escape enters command mode. -# * cursor motion with: h, l, j, k +# * cursor motion with: h, l +# * history motion with j,k (only supported on Irssi versions > 0.8.13) # * cursor word motion with: w, b, e # * delete at cursor: x # * Insert mode at pos: i, a @@ -231,6 +232,7 @@ sub cmd_movement_l { sub cmd_movement_j { my ($count, $pos) = @_; + return unless Irssi::version > 20090117; my @history = Irssi::active_win->get_history_lines(); if (defined $history_index) { @@ -253,6 +255,7 @@ sub cmd_movement_j { sub cmd_movement_k { my ($count, $pos) = @_; + return unless Irssi::version > 20090117; my @history = Irssi::active_win->get_history_lines(); if (defined $history_index) { |