From: wmorgan Date: Fri, 5 Jan 2007 22:45:58 +0000 (+0000) Subject: empty status when no lines X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=a02b09f3b10416c34420683502e921c27274fac4;p=sup empty status when no lines git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@194 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index 211fd5e..51d1d44 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -308,7 +308,11 @@ class ThreadIndexMode < LineCursorMode end def status - "line #{curpos + 1} of #{lines} #{dirty? ? '*modified*' : ''}" + if (l = lines) == 0 + "" + else + "line #{curpos + 1} of #{l} #{dirty? ? '*modified*' : ''}" + end end protected