summaryrefslogtreecommitdiff
path: root/src/internal.h
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-13 19:22:05 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-13 19:22:05 +0300
commit01e1c61e9fcf4a0b0164a7fe5395a209a50f6905 (patch)
tree1f1eb33e49eab338650a42e8f602af75d8d28a24 /src/internal.h
parent2d02d39d2cd32e9eb559638865d2746f02c08556 (diff)
Optimize hot loops with direct access, LUTs, and closed-form formulas
Diffstat (limited to 'src/internal.h')
-rw-r--r--src/internal.h3
1 files changed, 3 insertions, 0 deletions
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)