void vi_redraw(struct visor *vi)
{
- int i, col, cur_x = 0, cur_y = 0;
+ int i = 0, col, cur_x = 0, cur_y = 0;
char c;
struct vi_buffer *vb;
struct vi_span *sp, *spans_end;
const char *tptr, *tend;
vi_addr spoffs, addr;
+ if(!vi->buflist) goto end;
+
vb = vi->buflist;
if(!(sp = vi_buf_find_span(vb, vb->view_start, &spoffs))) {
sp = vb->spans;
void term_cleanup(void)
{
+ term_clear();
+ term_setcursor(0, 0);
+ term_flush();
tcsetattr(ttyfd, TCSAFLUSH, &saved_term);
close(ttyfd);
ttyfd = -1;
}
+void term_reset(void)
+{
+ term_puts("\033c");
+ term_flush();
+}
+
void term_getsize(int *width, int *height)
{
*width = term_width;
int term_init(const char *ttypath);
void term_cleanup(void);
+void term_reset(void);
void term_getsize(int *width, int *height);
void term_resize_func(void (*func)(int, int));