aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
authorRandy Palamar <randy@rnpnr.xyz>2025-01-11 23:39:06 -0700
committerRandy Palamar <randy@rnpnr.xyz>2025-01-11 23:49:58 -0700
commit0f31ef53420b755c3978818bcd2e5a86e141413d (patch)
tree508af7b7016f9aa2fbe766f310a8dfdc446d8a77 /vis.c
parentabf6384cca0f80fe7dfb35a8e2281d8664d9d459 (diff)
downloadvis-0f31ef53420b755c3978818bcd2e5a86e141413d.tar.gz
vis-0f31ef53420b755c3978818bcd2e5a86e141413d.tar.xz
buffer: clear out one line functions
Buffer is fully exposed to the program, no need to rely on the linker to optimize useless code.
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c4
1 files changed, 2 insertions, 2 deletions
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;