diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2011-10-10 22:38:58 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2011-10-10 22:38:58 +0000 |
| commit | 219709e472f4f7948d164316c8b24d4fb0505636 (patch) | |
| tree | f154a663585fceed6d9ca4296bc0c2859eb10f06 /src/completion.hh | |
| parent | fe0e1c79f05cee628b82a2b2f655d873ed922a78 (diff) | |
Completions: move code from main.cc to completion.hh
Diffstat (limited to 'src/completion.hh')
| -rw-r--r-- | src/completion.hh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/completion.hh b/src/completion.hh index 739c24ea..e4fe8062 100644 --- a/src/completion.hh +++ b/src/completion.hh @@ -3,6 +3,7 @@ #include <string> #include <vector> +#include <functional> namespace Kakoune { @@ -28,5 +29,15 @@ CandidateList complete_filename(const std::string& prefix, CandidateList complete_buffername(const std::string& prefix, size_t cursor_pos = std::string::npos); +typedef std::function<Completions (const std::string&, size_t)> Completer; + +struct NullCompletion +{ + Completions operator() (const std::string&, size_t cursor_pos) + { + return Completions(cursor_pos, cursor_pos); + } +}; + } #endif // completion_hh_INCLUDED |
