]> git.cworth.org Git - sup/commitdiff
minor bugfixes
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 3 Jan 2007 13:31:45 +0000 (13:31 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 3 Jan 2007 13:31:45 +0000 (13:31 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@155 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/buffer.rb
lib/sup/imap.rb
lib/sup/mbox/ssh-file.rb

index 3aee146d612e54c1c4cfbea4d2211779c7d7b706..891303e41053dd65a053d36f8a605ae8b8f28679 100644 (file)
@@ -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
index bd7dc824af00917bb2858e35a8e2b71ec6330474..e250b2ef961a8a3c482fec0797ba0662c2e05c9e 100644 (file)
@@ -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
 
index 80211d050dff1a441da162ec5e373184aa4a090d..7a61b72aa82aa36253b7315863a933c694cd9022 100644 (file)
@@ -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