From: wmorgan Date: Wed, 3 Jan 2007 13:31:45 +0000 (+0000) Subject: minor bugfixes X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=eab3b63f9e555d0f322d9ab459a679bb9db7aea4;p=sup minor bugfixes git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@155 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb index 3aee146..891303e 100644 --- a/lib/sup/buffer.rb +++ b/lib/sup/buffer.rb @@ -374,18 +374,18 @@ class BufferManager end def draw_minibuf opts={} + m = nil @minibuf_mutex.synchronize do m = @minibuf_stack.compact m << @flash if @flash m << "" if m.empty? - - Ncurses.mutex.lock unless opts[:sync] == false - Ncurses.attrset Colormap.color_for(:none) - m.each_with_index do |s, i| - Ncurses.mvaddstr Ncurses.rows - i - 1, 0, s + (" " * [Ncurses.cols - s.length, 0].max) - end end + Ncurses.mutex.lock unless opts[:sync] == false + Ncurses.attrset Colormap.color_for(:none) + m.each_with_index do |s, i| + Ncurses.mvaddstr Ncurses.rows - i - 1, 0, s + (" " * [Ncurses.cols - s.length, 0].max) + end Ncurses.refresh if opts[:refresh] Ncurses.mutex.unlock unless opts[:sync] == false end diff --git a/lib/sup/imap.rb b/lib/sup/imap.rb index bd7dc82..e250b2e 100644 --- a/lib/sup/imap.rb +++ b/lib/sup/imap.rb @@ -124,7 +124,7 @@ class IMAP < Source def port; @parsed_uri.port || (ssl? ? 993 : 143); end def mailbox x = @parsed_uri.path[1..-1] - x.empty? ? 'INBOX' : x + x.nil? || x.empty? ? 'INBOX' : x end def ssl?; @parsed_uri.scheme == 'imaps' end diff --git a/lib/sup/mbox/ssh-file.rb b/lib/sup/mbox/ssh-file.rb index 80211d0..7a61b72 100644 --- a/lib/sup/mbox/ssh-file.rb +++ b/lib/sup/mbox/ssh-file.rb @@ -171,7 +171,7 @@ private begin retries = 0 connect - MBox::debug "sending command: #{cmd.inspect}" + # MBox::debug "sending command: #{cmd.inspect}" begin result = @shell.send_command cmd raise SSHFileError, "Failure during remote command #{cmd.inspect}: #{(result.stderr || result.stdout || "")[0 .. 100]}" unless result.status == 0