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-operators.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vis-operators.c') diff --git a/vis-operators.c b/vis-operators.c index 59abcf6..6b7f873 100644 --- a/vis-operators.c +++ b/vis-operators.c @@ -264,7 +264,7 @@ bool vis_operator(Vis *vis, enum VisOperator id, ...) { case VIS_OP_REPLACE: { Macro *macro = macro_get(vis, VIS_REG_DOT); - macro_reset(macro); + macro->len = 0; macro_append(macro, va_arg(ap, char*)); vis->action.arg.s = macro->data; break; -- cgit v1.2.3