From 513bf031a589d9e2a1a2730adf56f95e5e316a06 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Wed, 14 Oct 2026 17:17:43 +0300 Subject: Remove unused private functions and inline trivial helpers --- src/hist_view.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'src/hist_view.c') diff --git a/src/hist_view.c b/src/hist_view.c index f5a287b..362e995 100644 --- a/src/hist_view.c +++ b/src/hist_view.c @@ -3,11 +3,6 @@ #include #include -void term_hist_view_init(struct hist_view *v) -{ - *v = (struct hist_view){0}; -} - void term_hist_view_free(struct hist_view *v) { if (!v) @@ -17,17 +12,6 @@ void term_hist_view_free(struct hist_view *v) *v = (struct hist_view){0}; } -void term_hist_view_clear(struct hist_view *v) -{ - v->anchor = (struct view_anchor){0}; - v->index_cols = 0; -} - -void term_hist_view_reset_bottom(struct hist_view *v) -{ - v->anchor = (struct view_anchor){0}; -} - static uint64_t prefix(const struct hist_view *v, uint32_t n) { uint64_t sum = 0; @@ -240,7 +224,7 @@ void term_hist_view_rewrap(struct hist_view *v, const struct hist *h, int cols) term_hist_view_note_push(v, h, cols); if (v->anchor.active) { if (v->anchor.line_id >= hist_end_id(h)) - term_hist_view_reset_bottom(v); + v->anchor = (struct view_anchor){0}; else v->anchor.seg = (uint32_t)term_hist_cell_segment(h, v->anchor.line_id, v->anchor.cell, cols); } @@ -253,7 +237,7 @@ void term_hist_view_scroll_to(struct hist_view *v, const struct hist *h, int col { (void)screen_top; if (offset <= 0 || cols <= 0 || !h->lines) { - term_hist_view_reset_bottom(v); + v->anchor = (struct view_anchor){0}; return; } /* Allocation failure uses the read-only history walk. */ @@ -306,7 +290,7 @@ void term_hist_view_scroll(struct hist_view *v, const struct hist *h, int cols, break; seg -= count; if (++id == hist_end_id(h)) { - term_hist_view_reset_bottom(v); + v->anchor = (struct view_anchor){0}; return; } } -- cgit v1.2.3