From 37b4eacdc86e04dbca168b430eaedd829dd24ae6 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 26 Jan 2014 16:14:02 +0000 Subject: Rework command completion to allow partial token completion Implement hook completion. fixes #44 --- src/command_manager.hh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/command_manager.hh') diff --git a/src/command_manager.hh b/src/command_manager.hh index 72a4a7f8..78c93dd1 100644 --- a/src/command_manager.hh +++ b/src/command_manager.hh @@ -17,10 +17,10 @@ namespace Kakoune struct Context; using CommandParameters = memoryview; using Command = std::function; -using CommandCompleter = std::function; +using CommandCompleter = std::function; enum class CommandFlags { None = 0, @@ -38,7 +38,7 @@ constexpr bool operator&(CommandFlags lhs, CommandFlags rhs) class PerArgumentCommandCompleter { public: - using ArgumentCompleter = std::function; using ArgumentCompleterList = memoryview; @@ -46,11 +46,11 @@ public: PerArgumentCommandCompleter(ArgumentCompleterList completers) : m_completers(completers.begin(), completers.end()) {} - CandidateList operator()(const Context& context, - CompletionFlags flags, - CommandParameters params, - size_t token_to_complete, - ByteCount pos_in_token) const; + Completions operator()(const Context& context, + CompletionFlags flags, + CommandParameters params, + size_t token_to_complete, + ByteCount pos_in_token) const; private: std::vector m_completers; -- cgit v1.2.3