]> git.cworth.org Git - notmuch/blobdiff - vim/notmuch.vim
vim: make the html handler configurable
[notmuch] / vim / notmuch.vim
index d7b310c8a07cfa99afb284a8c8ee99d44d5d5028..0cb94f6c93b542812b0b3942ae77f1ee710c2e5c 100644 (file)
@@ -633,7 +633,7 @@ ruby << EOF
        def folders_render()
                $curbuf.render do |b|
                        folders = VIM::evaluate('g:notmuch_folders')
-                       count_threads = VIM::evaluate('g:notmuch_folders_count_threads')
+                       count_threads = VIM::evaluate('g:notmuch_folders_count_threads') == 1
                        $searches.clear
                        folders.each do |name, search|
                                q = $curbuf.query(search)
@@ -919,7 +919,8 @@ ruby << EOF
                                if mime_type != "text/html"
                                        text = decoded
                                else
-                                       IO.popen("elinks --dump", "w+") do |pipe|
+                                       IO.popen(VIM::evaluate('exists("g:notmuch_html_converter") ? ' +
+                                                       'g:notmuch_html_converter : "elinks --dump"'), "w+") do |pipe|
                                                pipe.write(decode_body)
                                                pipe.close_write
                                                text = pipe.read