summaryrefslogtreecommitdiff
path: root/src/internal.h
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-15 11:37:31 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-15 11:37:31 +0300
commitaf6a37b1c4509c7766933a7cb45d2ee9a3a23f98 (patch)
treee7b0294ebf0d9b124b8885a76c119d7f46d5b0fb /src/internal.h
parentacd338ea33de36d223cc6d301712eed4a9501e6c (diff)
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.
Diffstat (limited to 'src/internal.h')
-rw-r--r--src/internal.h15
1 files changed, 0 insertions, 15 deletions
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;