Velocity/core/buffer.py

10 lines
386 B
Python
Raw Normal View History

2022-03-15 22:12:52 +00:00
import curses
2022-03-17 21:47:19 +00:00
def write_buffer(screen, data):
for index, line in enumerate(data["buffer_list"][data["visible_y"]:]):
if index < data["height"] - 2:
str_line = "".join(line)
# [data["visible_x"]:1:data["width"] - data["visible_x"]]
screen.addstr(index, len(data["info_bar"][0]), str_line + (" " * (len(line) - 1)), curses.color_pair(1))