3 class LogMode < TextMode
5 k.add :toggle_follow, "Toggle follow mode", 'f'
6 k.add :save_to_disk, "Save log to disk", 's'
18 jump_to_line lines - buffer.content_height + 1 # leave an empty line at bottom
27 follow_top = lines - buffer.content_height + 1
28 jump_to_line follow_top if topline < follow_top
35 follow_top = lines - buffer.content_height + 1
36 jump_to_line follow_top if topline < follow_top
41 fn = BufferManager.ask_for_filename :filename, "Save log to file: "
42 save_to_file(fn) { |f| f.puts text } if fn
46 super + " (follow: #@follow)"