aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Ruderich <simon@ruderich.org>2010-09-29 14:53:37 +0000
committerSimon Ruderich <simon@ruderich.org>2010-09-29 14:53:37 +0000
commit9e11fd40f49ab53b50aedd9a874516af223e6b55 (patch)
tree0634613efd69bfc5fe3340ce404d50713ae0e40c
parentvim_mode: Comment update. (diff)
downloadirssi-scripts-9e11fd40f49ab53b50aedd9a874516af223e6b55.tar.gz
irssi-scripts-9e11fd40f49ab53b50aedd9a874516af223e6b55.zip
vim_mode: Make sure ex commands match from the beginning.
-rw-r--r--vim-mode/vim_mode.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl
index 0b2bb37..c4719d7 100644
--- a/vim-mode/vim_mode.pl
+++ b/vim-mode/vim_mode.pl
@@ -756,7 +756,7 @@ sub cmd_movement_register {
sub cmd_ex_command {
my $arg_str = join '', @ex_buf;
- if ($arg_str =~ m|s/(.+)/(.*)/([ig]*)|) {
+ if ($arg_str =~ m|^s/(.+)/(.*)/([ig]*)|) {
my ($search, $replace, $flags) = ($1, $2, $3);
print "Searching for $search, replace: $replace, flags; $flags"
if DEBUG;
@@ -784,7 +784,7 @@ sub cmd_ex_command {
print "New line is: $line" if DEBUG;
_input($line);
- } elsif ($arg_str =~ m|b(?:uffer)?\s*(.+)$|) {
+ } elsif ($arg_str =~ m|^b(?:uffer)?\s*(.+)$|) {
my $window;
my $item;
my $buffer = $1;