aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim
diff options
context:
space:
mode:
authorGravatar Felipe Contreras <felipe.contreras@gmail.com>2014-05-01 17:57:52 -0500
committerGravatar David Bremner <david@tethera.net>2014-05-03 05:59:38 +0900
commit2fee62fd1fcaed5c9ec46daa4f24b33a2f310e83 (patch)
tree7d1f738d26b58256ddbeb764bc5783184adaafbc /vim
parent697d6b5a47dfefa80a93eb6aad54cd9e78b33430 (diff)
vim: fix count_threads variable check
It never really worked; in Ruby only 'nil' and 'false' evaluate to false, therefore the statement '0 : true ? false' returns true, so it doesn't matter if notmuch_folders_count_threads = 0, count_threads would be true. We need to check specifically if the value is 1 or 0. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Diffstat (limited to 'vim')
-rw-r--r--vim/notmuch.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index d7b310c8..25a16e9a 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -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)