]> git.cworth.org Git - sup/commitdiff
no status line with 0 lines
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Fri, 5 Jan 2007 22:40:57 +0000 (22:40 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Fri, 5 Jan 2007 22:40:57 +0000 (22:40 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@193 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/modes/line-cursor-mode.rb

index 373a5fc1fec74d131621dedc576f974797666c61..5efefae896e1178bb3d08ade28b910a54d28e360 100644 (file)
@@ -124,7 +124,8 @@ protected
 private
 
   def set_status
-    @status = "line #{@curpos + 1} of #{lines}"
+    l = lines
+    @status = l > 0 ? "line #{@curpos + 1} of #{l}" : ""
   end
 
 end