diff options
| author | Simon Ruderich <simon@ruderich.org> | 2010-09-27 21:28:52 +0000 | 
|---|---|---|
| committer | Simon Ruderich <simon@ruderich.org> | 2010-09-27 21:32:31 +0000 | 
| commit | 31939d43bce286f4b13a2e4ceeab68e5d88ed986 (patch) | |
| tree | 67820a6c610ecea674fa3d546207f9f0b0841c90 | |
| parent | changed word and non_word variables to use pre-compiled regex patterns rather (diff) | |
| download | irssi-scripts-31939d43bce286f4b13a2e4ceeab68e5d88ed986.tar.gz irssi-scripts-31939d43bce286f4b13a2e4ceeab68e5d88ed986.zip | |
vim_mode: Use new _warn() to display warnings.
| -rw-r--r-- | vim-mode/vim_mode.pl | 12 | 
1 files changed, 9 insertions, 3 deletions
| 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 <prefix>) | 
