summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-03-05 14:38:19 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-03-05 14:38:19 -0500
commit23771a9e599700aa9c80139abb122a0f6c97976a (patch)
tree9fd67445e59e4df66a5832378ba533d6dd7c73fe /ted.c
parent3afd86c471e3ae6f806737908689a20eb686360a (diff)
fix rendering if border-thickness is big
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ted.c b/ted.c
index cc9eb06..3150458 100644
--- a/ted.c
+++ b/ted.c
@@ -172,6 +172,13 @@ static i32 ted_new_node(Ted *ted) {
}
+// how tall is a line buffer?
+static float ted_line_buffer_height(Ted const *ted) {
+ Settings const *settings = &ted->settings;
+ float const char_height = text_font_char_height(ted->font);
+ return char_height + 2 * settings->border_thickness;
+}
+
// switch to this node
static void ted_node_switch(Ted *ted, Node *node) {
assert(node->tabs);