def truncate content # :nodoc:
      maxlen = @maxlen || @width-@internal_width
      maxlen = @width-@internal_width if maxlen > @width-@internal_width
      if maxlen == 0 # (otherwise it becoems -1 below)
        content.replace ""
        return
      end
      if !content.nil? 
        cl = content.length
        if cl > maxlen # only show maxlen
          @longest_line = cl if cl > @longest_line
          #content = content[@pcol..@pcol+maxlen-1] 
          ## taking care of when scrolling is needed but longest_line is misreported
          # So we scroll always and need to check 2013-03-06 - 00:09 
          content.replace(content[@pcol..@pcol+maxlen-1] || " ")
        else
          ## taking care of when scrolling is needed but longest_line is misreported
          # So we scroll always and need to check 2013-03-06 - 00:09 
          content.replace(content[@pcol..-1]||" ") if @pcol > 0 
        end
      end
      content
    end
def truncate content # :nodoc:
      maxlen = @maxlen || @width-@internal_width
      maxlen = @width-@internal_width if maxlen > @width-@internal_width
      if maxlen == 0 # (otherwise it becoems -1 below)
        content.replace ""
        return
      end
      if !content.nil? 
        cl = content.length
        if cl > maxlen # only show maxlen
          @longest_line = cl if cl > @longest_line
          #content = content[@pcol..@pcol+maxlen-1] 
          ## taking care of when scrolling is needed but longest_line is misreported
          # So we scroll always and need to check 2013-03-06 - 00:09 
          content.replace(content[@pcol..@pcol+maxlen-1] || " ")
        else
          ## taking care of when scrolling is needed but longest_line is misreported
          # So we scroll always and need to check 2013-03-06 - 00:09 
          content.replace(content[@pcol..-1]||" ") if @pcol > 0 
        end
      end
      content
    end
returns only the visible portion of string taking into account display length
 and horizontal scrolling. MODIFIES STRING