fix returning to folders after searching a few times
authorBart Trojanowski <bart@jukie.net>
Sun, 22 Nov 2009 04:17:41 +0000 (23:17 -0500)
committerBart Trojanowski <bart@jukie.net>
Wed, 25 Nov 2009 05:48:53 +0000 (00:48 -0500)
vim/plugin/notmuch.vim

index 308fc05d8010094bffe66678d54ceecfbc7301cf..d786cedf52247d7617d2dde0ede7b30c751b3c45 100644 (file)
@@ -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)