summaryrefslogtreecommitdiff
path: root/src/core.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/core.c
parent234dd752dc2e15afab38cbbf78f8aa32be72ea5f (diff)
Remove unused private functions and inline trivial helpers
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c40
1 files changed, 1 insertions, 39 deletions
diff --git a/src/core.c b/src/core.c
index f9d547d..7bca76e 100644
--- a/src/core.c
+++ b/src/core.c
@@ -356,16 +356,6 @@ void term_sc_tab(struct term *t, int n)
if (cur) cur->version++;
}
-void term_sc_scroll_region(struct term *t, int top, int bottom, int n, bool down)
-{
- term_screen_scroll_region(t, top, bottom, n, down, false);
-}
-
-void term_sc_scroll(struct term *t, int n, bool down)
-{
- term_screen_scroll_region(t, t->scroll_top, t->scroll_bottom, n, down, true);
-}
-
#define CELL_SGR_FLAGS (CELL_BOLD | CELL_FAINT | CELL_ITALIC | \
CELL_STRIKE | CELL_OVERLINE | CELL_ANY_UNDERLINE)
@@ -510,20 +500,6 @@ void term_sc_reset(struct term *t)
t->full_gen++;
}
-void term_sc_set_reverse_video(struct term *t, bool enabled)
-{
- if (t->reverse_video != enabled) {
- t->reverse_video = enabled;
- t->full_gen++;
- }
-}
-
-void term_sc_set_autowrap(struct term *t, bool enabled)
-{
- t->autowrap = enabled;
- t->pending_wrap = false;
-}
-
void term_sc_set_cursor_style(struct term *t, int ps)
{
if (ps == 0) {
@@ -537,13 +513,6 @@ void term_sc_set_cursor_style(struct term *t, int ps)
term_row(t, t->cursor_y)->version++;
}
-static inline int newline_bytes(const char *buf, size_t len)
-{
- if (len >= 2 && buf[0] == '\r' && buf[1] == '\n') return 2;
- if (len >= 1 && buf[0] == '\n') return 1;
- return 0;
-}
-
static inline bool next_byte_wraps(const char *buf, size_t len, size_t pos, uint32_t last)
{
if (pos >= len) return false;
@@ -1289,15 +1258,8 @@ narrow_done:
continue;
}
- if (!run) {
- int neol = newline_bytes(buf + i, len - i);
- if (neol == 2 || (neol == 1 && lnm)) {
- emit_stream_row(&ctx, buf + i, 0, false);
- i += (size_t)neol;
- continue;
- }
+ if (!run)
break;
- }
bool wrapped = run == cols && autowrap &&
next_byte_wraps(buf, len, i + (size_t)run,