From a712dd5bbe8d2b4b433ce90f7d977acf762ad080 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 6 Aug 2012 21:37:43 +0200 Subject: Completions functions take a Context parameter --- src/completion.hh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/completion.hh') 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 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 Completer; +typedef std::function 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); } -- cgit v1.2.3