summaryrefslogtreecommitdiff
path: root/src/completion.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/completion.hh')
-rw-r--r--src/completion.hh11
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);
}