From 31939d43bce286f4b13a2e4ceeab68e5d88ed986 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 27 Sep 2010 23:28:52 +0200 Subject: vim_mode: Use new _warn() to display warnings. --- vim-mode/vim_mode.pl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'vim-mode') diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 0aa6b61..944db53 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -1017,8 +1017,8 @@ sub handle_command { # Start Ex mode. } elsif ($char eq ':') { if (not script_is_loaded('prompt_info')) { - print "This script requires the 'prompt_info' script to " - . "support Ex mode. Please load it and try again."; + _warn("Warning: Ex mode requires the 'prompt_info' script. " . + "Please load it and try again."); } else { _update_mode(M_EX); _set_prompt(':'); @@ -1061,7 +1061,7 @@ sub setup_changed { 'func' => sub { _update_mode(M_CMD) } }; } else { - print "Error: vim_mode_cmd_seq must be a single character"; + _warn("Error: vim_mode_cmd_seq must be a single character"); } } @@ -1210,5 +1210,11 @@ sub _set_prompt { Irssi::signal_emit('change prompt', $msg); } +sub _warn { + my ($warning) = @_; + + print "vim_mode: ", $warning; +} + # TODO: # 10gg -> go to window 10 (prefix.gg -> win ) -- cgit v1.2.3