From 0f31ef53420b755c3978818bcd2e5a86e141413d Mon Sep 17 00:00:00 2001 From: Randy Palamar Date: Sat, 11 Jan 2025 23:39:06 -0700 Subject: buffer: clear out one line functions Buffer is fully exposed to the program, no need to rely on the linker to optimize useless code. --- vis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vis.c') diff --git a/vis.c b/vis.c index 0f2e325..c561a3b 100644 --- a/vis.c +++ b/vis.c @@ -1353,7 +1353,7 @@ void macro_operator_record(Vis *vis) { if (vis->macro_operator) return; vis->macro_operator = macro_get(vis, VIS_MACRO_OPERATOR); - macro_reset(vis->macro_operator); + vis->macro_operator->len = 0; } void macro_operator_stop(Vis *vis) { @@ -1370,7 +1370,7 @@ bool vis_macro_record(Vis *vis, enum VisRegister id) { if (vis->recording || !macro) return false; if (!(VIS_REG_A <= id && id <= VIS_REG_Z)) - macro_reset(macro); + macro->len = 0; vis->recording = macro; vis_event_emit(vis, VIS_EVENT_WIN_STATUS, vis->win); return true; -- cgit v1.2.3