From 5640fd174949c7585461d0b29e553f7c01d8f9ec Mon Sep 17 00:00:00 2001 From: K Date: Mon, 31 Jul 2023 00:30:56 -0400 Subject: [PATCH] Center and tweak margins --- apps/yaft/terminal.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/yaft/terminal.cpp b/apps/yaft/terminal.cpp index 2d69f7f..c5241f7 100755 --- a/apps/yaft/terminal.cpp +++ b/apps/yaft/terminal.cpp @@ -384,10 +384,10 @@ term_init(struct terminal_t* term, int width, int height) { term->width = width; term->height = height; - term->cols = term->width / CELL_WIDTH; - term->lines = term->height / CELL_HEIGHT; + term->cols = (term->width - 2) / CELL_WIDTH; + term->lines = (term->height - 2) / CELL_HEIGHT; - term->marginTop = (term->height - term->lines * CELL_HEIGHT); + term->marginTop = (term->height - term->lines * CELL_HEIGHT) / 2; term->shouldClear = false; term->esc.size = ESCSEQ_SIZE;