From c39b94949be30dfbc1c3e271b37ca04cff303b16 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 6 Feb 2016 19:17:43 -0800 Subject: Complete to take a pointer to output completions, not a mutable ref --- src/complete.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/complete.cpp') diff --git a/src/complete.cpp b/src/complete.cpp index 5da53aeb..266451c4 100644 --- a/src/complete.cpp +++ b/src/complete.cpp @@ -1631,7 +1631,7 @@ bool completer_t::try_complete_user(const wcstring &str) return res; } -void complete(const wcstring &cmd_with_subcmds, std::vector &comps, completion_request_flags_t flags) +void complete(const wcstring &cmd_with_subcmds, std::vector *out_comps, completion_request_flags_t flags) { /* Determine the innermost subcommand */ const wchar_t *cmdsubst_begin, *cmdsubst_end; @@ -1872,7 +1872,7 @@ void complete(const wcstring &cmd_with_subcmds, std::vector &comps } } - comps = completer.get_completions(); + *out_comps = completer.get_completions(); } -- cgit v1.2.3