Method: AnsiTerm::Buffer#scroll_up

Defined in:
lib/ansiterm/buffer.rb

#scroll_up(num = 1, scroll_cache: false) ⇒ Object

This scrolls the buffer up If you want it to also scroll the cache pass ‘scroll_cache: true`. This will presume that you’ve scrolled the terminal yourself.



68
69
70
71
72
73
74
# File 'lib/ansiterm/buffer.rb', line 68

def scroll_up(num=1, scroll_cache: false)
  @lines.slice!(0)
  @lines << AnsiTerm::String.new
  if scroll_cache
    @cache.slice!(0)
  end
end