From 5b7b6eebafc025a33a2fba39f1873d4d09a04d86 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 5 Aug 2016 13:53:19 +0100 Subject: Regenerate shell-candidates for each completion sessions That should allow fixing the #665 issue while still avoiding to run a potentially long shell command on each keystroke. --- src/command_manager.hh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/command_manager.hh') diff --git a/src/command_manager.hh b/src/command_manager.hh index 4a1c4c01..601629cb 100644 --- a/src/command_manager.hh +++ b/src/command_manager.hh @@ -126,6 +126,8 @@ public: Completions complete_command_name(const Context& context, StringView query, bool with_aliases) const; + void clear_last_complete_command() { m_last_complete_command = String{}; } + private: void execute_single_command(CommandParameters params, Context& context, @@ -143,6 +145,7 @@ private: }; using CommandMap = UnorderedMap; CommandMap m_commands; + String m_last_complete_command; CommandMap::const_iterator find_command(const Context& context, const String& name) const; -- cgit v1.2.3