lib/sup/modes/scroll-mode.rb in sup-0.8.1 vs lib/sup/modes/scroll-mode.rb in sup-0.9
- old
+ new
@@ -1,11 +1,11 @@
module Redwood
class ScrollMode < Mode
## we define topline and botline as the top and bottom lines of any
## content in the currentview.
-
+
## we left leftcol and rightcol as the left and right columns of any
## content in the current view. but since we're operating in a
## line-centric fashion, rightcol is always leftcol + the buffer
## width. (whereas botline is topline + at most the buffer height,
## and can be == to topline in the case that there's no content.)
@@ -221,10 +221,10 @@
xpos = 0
a.each_with_index do |(color, text), i|
raise "nil text for color '#{color}'" if text.nil? # good for debugging
l = text.display_length
no_fill = i != a.size - 1
-
+
if xpos + l < @leftcol
buffer.write ln - @topline, 0, "", :color => color,
:highlight => opts[:highlight]
elsif xpos < @leftcol
## partial