summaryrefslogtreecommitdiff
path: root/src/hist_view.c
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-14 17:17:43 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-14 17:17:43 +0300
commit513bf031a589d9e2a1a2730adf56f95e5e316a06 (patch)
tree66ef6b095e6aa00c790ac37705fb9df3b099b92a /src/hist_view.c
parent234dd752dc2e15afab38cbbf78f8aa32be72ea5f (diff)
Remove unused private functions and inline trivial helpers
Diffstat (limited to 'src/hist_view.c')
-rw-r--r--src/hist_view.c22
1 files changed, 3 insertions, 19 deletions
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 <stdlib.h>
#include <string.h>
-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;
}
}