From 01e1c61e9fcf4a0b0164a7fe5395a209a50f6905 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Tue, 13 Oct 2026 19:22:05 +0300 Subject: Optimize hot loops with direct access, LUTs, and closed-form formulas --- src/internal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/internal.h') diff --git a/src/internal.h b/src/internal.h index 979883e..477210d 100644 --- a/src/internal.h +++ b/src/internal.h @@ -205,6 +205,7 @@ struct term { struct cell *view_row_scratch; int tabs_cap; int view_scratch_cap; + bool custom_tabs; char osc_buf[256]; char tcap_name[64]; @@ -347,11 +348,13 @@ static inline struct text_pen term_text_pen(const struct term *t) static inline void term_tabs_clear(struct term *t) { memset(t->tabs, 0, (size_t)t->tabs_cap); + t->custom_tabs = true; } static inline void term_tabs_default(struct term *t) { for (int c = 8; c < t->tabs_cap; c += 8) t->tabs[c] = 1; + t->custom_tabs = false; } static inline bool term_str_was_truncated(struct term *t) -- cgit v1.2.3