From 9e11fd40f49ab53b50aedd9a874516af223e6b55 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 29 Sep 2010 16:53:37 +0200 Subject: vim_mode: Make sure ex commands match from the beginning. --- vim-mode/vim_mode.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vim-mode') 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; -- cgit v1.2.3