diff options
| author | Randy Palamar <randy@rnpnr.xyz> | 2025-01-11 23:10:24 -0700 |
|---|---|---|
| committer | Randy Palamar <randy@rnpnr.xyz> | 2025-01-11 23:27:47 -0700 |
| commit | abf6384cca0f80fe7dfb35a8e2281d8664d9d459 (patch) | |
| tree | bc141b463e155b2170d2d70e9bb340614d76644d /vis.c | |
| parent | 72c26fc09af79ce217575a9b0f0d5058c336d5d7 (diff) | |
| download | vis-abf6384cca0f80fe7dfb35a8e2281d8664d9d459.tar.gz vis-abf6384cca0f80fe7dfb35a8e2281d8664d9d459.tar.xz | |
buffer: delete pointless buffer_init function
lets not make the code harder to read for no reason
Diffstat (limited to 'vis.c')
| -rw-r--r-- | vis.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -587,7 +587,7 @@ Vis *vis_new(void) { array_init(&vis->bindings); array_init(&vis->actions_user); action_reset(&vis->action); - buffer_init(&vis->input_queue); + vis->input_queue = (Buffer){0}; if (!(vis->command_file = file_new_internal(vis, NULL))) goto err; if (!(vis->search_file = file_new_internal(vis, NULL))) @@ -1167,8 +1167,7 @@ static void vis_keys_process(Vis *vis, size_t pos) { void vis_keys_feed(Vis *vis, const char *input) { if (!input) return; - Macro macro; - macro_init(¯o); + Macro macro = {0}; if (!macro_append(¯o, input)) return; /* use internal function, to keep Lua based tests which use undo points working */ @@ -1855,9 +1854,7 @@ int vis_pipe_buf(Vis *vis, const char* buf, const char *argv[], } static int _vis_pipe_collect(Vis *vis, File *file, Filerange *range, const char* buf, const char *argv[], char **out, char **err, bool fullscreen) { - Buffer bufout, buferr; - buffer_init(&bufout); - buffer_init(&buferr); + Buffer bufout = {0}, buferr = {0}; int status = _vis_pipe(vis, file, range, buf, argv, &bufout, out ? read_into_buffer : NULL, &buferr, err ? read_into_buffer : NULL, |
