diff options
-rw-r--r-- | vim/plugin/notmuch.vim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index 308fc05d..d786cedf 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -241,12 +241,13 @@ function! s:NM_search_prompt() else let tags = s:notmuch_initial_search_words_defaults endif - let prev_bufnr = bufnr('%') if b:nm_type == 'search' " TODO: we intend to replace the current buffer, " ... maybe we could just clear it + let prev_bufnr = b:nm_prev_bufnr setlocal bufhidden=delete else + let prev_bufnr = bufnr('%') setlocal bufhidden=hide endif call <SID>NM_cmd_search(tags) |