]> git.cworth.org Git - sup/commitdiff
empty status when no lines
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Fri, 5 Jan 2007 22:45:58 +0000 (22:45 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Fri, 5 Jan 2007 22:45:58 +0000 (22:45 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@194 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/modes/thread-index-mode.rb

index 211fd5e3b6890edeca96a67ad302a60640b9b942..51d1d44da35acc71c1dd9876c0f8b11cbe4d99c0 100644 (file)
@@ -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