diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2016-08-05 13:53:19 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2016-08-05 13:53:19 +0100 |
| commit | 5b7b6eebafc025a33a2fba39f1873d4d09a04d86 (patch) | |
| tree | 5b0136043bd704542af5801c82ed998a75b7eab3 /src/command_manager.hh | |
| parent | 38d372567bab6f55d82d1e672485e8b9b23e59b2 (diff) | |
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.
Diffstat (limited to 'src/command_manager.hh')
| -rw-r--r-- | src/command_manager.hh | 3 |
1 files changed, 3 insertions, 0 deletions
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<String, CommandDescriptor, MemoryDomain::Commands>; CommandMap m_commands; + String m_last_complete_command; CommandMap::const_iterator find_command(const Context& context, const String& name) const; |
