From af6a37b1c4509c7766933a7cb45d2ee9a3a23f98 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Thu, 15 Oct 2026 11:37:31 +0300 Subject: Return owned text and share cell attribute flags with snapshots Make text queries return allocated strings released with term_text_free, keeping each capture atomic. Align public attributes with the write core, remove snapshot conversion tables, and migrate tests and the Kitty adapter. --- src/internal.h | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/internal.h') diff --git a/src/internal.h b/src/internal.h index d823018..8c02c91 100644 --- a/src/internal.h +++ b/src/internal.h @@ -364,21 +364,6 @@ static inline bool term_str_was_truncated(struct term *t) return truncated; } -/* Copy text into buf with the rules of term_selection_text(). NULL text - * copies as empty. Return the full length. */ -static inline size_t term_copy_out(const char *text, char *buf, size_t cap) -{ - if (!text) - text = ""; - size_t n = strlen(text); - if (buf && cap) { - size_t k = n < cap ? n : cap - 1; - if (k) memcpy(buf, text, k); - buf[k] = '\0'; - } - return n; -} - /* Every thread has its own anchor, so its address names the thread. */ extern _Thread_local char term_thread_anchor; -- cgit v1.2.3