From 34fd58554a4369523a02bde26bdd75bf09c76ff0 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 10 Oct 2010 03:13:22 +0200 Subject: vim_mode: Fix :bd from displaying buffers matching d. --- vim-mode/vim_mode.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vim-mode/vim_mode.pl') diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 828f5a8..2eefd66 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -1952,9 +1952,10 @@ sub b_windows_cb { my $windows = ''; - # A little code duplication of cmd_ex_command()! + # A little code duplication of cmd_ex_command(), but \s+ instead of \s* so + # :bd doesn't display buffers matching d. my $arg_str = join '', @ex_buf; - if ($arg_str =~ m|^b(?:uffer)?\s*(.+)$|) { + if ($arg_str =~ m|^b(?:uffer)?\s+(.+)$|) { my $buffer = $1; if ($buffer !~ /^[0-9]$/ and $buffer ne '#') { # Display matching windows. -- cgit v1.2.3