aboutsummaryrefslogtreecommitdiff
path: root/vis.h
diff options
context:
space:
mode:
authorRandy Palamar <randy@rnpnr.xyz>2025-12-05 14:53:04 -0700
committerRandy Palamar <randy@rnpnr.xyz>2025-12-05 17:29:12 -0700
commit402bc58112c5881d814ee6b04559d7369d455a9f (patch)
treef9b028b2c8e4b8b65da5055ebd2ed9c31f375cdd /vis.h
parent1baf9352ae760f576f2ad213256649bdb266ddfb (diff)
downloadvis-402bc58112c5881d814ee6b04559d7369d455a9f.tar.gz
vis-402bc58112c5881d814ee6b04559d7369d455a9f.tar.xz
vis-lua: complete_command: utilize map_prefix() instead of grep
we already have a function for filtering by a prefix. No need for snprintf and extra grep process for filtering. also use simpler buffer_append for appending instead of going through string formatting
Diffstat (limited to 'vis.h')
-rw-r--r--vis.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/vis.h b/vis.h
index 01bf1a0..80a37aa 100644
--- a/vis.h
+++ b/vis.h
@@ -1234,8 +1234,9 @@ bool vis_prompt_cmd(Vis *vis, const char *cmd);
* Write newline separated list of available commands to ``buf``
* @param vis The editor instance.
* @param buf The buffer to write to.
+ * @param prefix Prefix to filter command list by.
*/
-void vis_print_cmds(Vis*, Buffer *buf);
+void vis_print_cmds(Vis*, Buffer *buf, const char *prefix);
/**
* Pipe a given file range to an external process.