[notmuch] [PATCH] Enforce foldmethod=manual when showing messages in vim

Subject: [notmuch] [PATCH] Enforce foldmethod=manual when showing messages in vim

Date: Tue, 2 Feb 2010 22:51:28 +1300

To: notmuch@notmuchmail.org

Cc:

From: martin f. krafft


Vim's NotMuch mode relies on manual markers when rendering/showing
a message. If foldmethod is set to something else (marker in my case) by
default, then there are numerous errors, and folds don't work. Hence,
set foldmethod=manual for the local buffer upon showing a message.

Signed-off-by: martin f. krafft <madduck@debian.org>
---
 vim/plugin/notmuch.vim |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim
index a226f20..2f9b05c 100644
--- a/vim/plugin/notmuch.vim
+++ b/vim/plugin/notmuch.vim
@@ -421,6 +421,7 @@ function! s:NM_cmd_show(words)
         let b:nm_raw_info = info
         let b:nm_prev_bufnr = prev_bufnr
 
+        setlocal foldmethod=manual
         call <SID>NM_cmd_show_mkfolds()
         call <SID>NM_cmd_show_mksyntax()
         call <SID>NM_set_map('n', g:notmuch_show_maps)
-- 
1.6.6



Thread: