diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-08-06 21:37:43 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-08-06 21:37:43 +0200 |
| commit | a712dd5bbe8d2b4b433ce90f7d977acf762ad080 (patch) | |
| tree | f5d8b0b8f6d5724aa4f84cb173c1f01b753621c4 /src/completion.hh | |
| parent | 39797f87dc73675881854b38611489de1dba6b8f (diff) | |
Completions functions take a Context parameter
Diffstat (limited to 'src/completion.hh')
| -rw-r--r-- | src/completion.hh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/completion.hh b/src/completion.hh index 578076db..775d558e 100644 --- a/src/completion.hh +++ b/src/completion.hh @@ -9,6 +9,8 @@ namespace Kakoune { +class Context; + typedef std::vector<String> CandidateList; struct Completions @@ -24,12 +26,15 @@ struct Completions : start(start), end(end) {} }; -CandidateList complete_filename(const String& prefix, +CandidateList complete_filename(const Context& context, + const String& prefix, size_t cursor_pos = -1); -typedef std::function<Completions (const String&, size_t)> Completer; +typedef std::function<Completions (const Context&, + const String&, size_t)> Completer; -inline Completions complete_nothing(const String&, size_t cursor_pos) +inline Completions complete_nothing(const Context& context, + const String&, size_t cursor_pos) { return Completions(cursor_pos, cursor_pos); } |
