aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Bart Trojanowski <bart@jukie.net>2009-11-25 20:01:13 -0500
committerGravatar Bart Trojanowski <bart@jukie.net>2009-11-25 20:01:13 -0500
commit7a7be482f79b13130fa2b053df9fdea6b86d4c95 (patch)
treeb527f22349028e5e8138c3e2be3c856383f667ae
parente2fd1d9970d5ad61017a307ab133990150192d37 (diff)
vim: fix a case where we started with :NotMuch search
-rw-r--r--vim/plugin/notmuch.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim
index ade2e45d..e41daed1 100644
--- a/vim/plugin/notmuch.vim
+++ b/vim/plugin/notmuch.vim
@@ -254,7 +254,7 @@ function! s:NM_search_prompt()
let tags = s:notmuch_initial_search_words_defaults
endif
let prev_bufnr = bufnr('%')
- if b:nm_type == 'search'
+ if b:nm_type == 'search' && exists('b:nm_prev_bufnr')
" TODO: we intend to replace the current buffer,
" ... maybe we could just clear it
let prev_bufnr = b:nm_prev_bufnr
@@ -1000,6 +1000,7 @@ function! NotMuch(args)
if words[0] == 'folders'
let words = words[1:]
call <SID>NM_cmd_folders(words)
+
elseif words[0] == 'search'
if len(words) > 1
let words = words[1:]