summaryrefslogtreecommitdiff
path: root/src/insert_completer.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-12-28 00:18:38 +0000
committerMaxime Coste <frrrwww@gmail.com>2015-12-28 00:18:38 +0000
commite938040e351e9f08e9ebffdf541a7efb6769f5d9 (patch)
tree10bb6815484740e0e8f6afc35c912eaab94cf841 /src/insert_completer.hh
parent5217089902b81bcf318ea1d7f420524d86ed0464 (diff)
Cleanup InsertCompleter get rid of unneeded candidate vector copy
Diffstat (limited to 'src/insert_completer.hh')
-rw-r--r--src/insert_completer.hh10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/insert_completer.hh b/src/insert_completer.hh
index 2de8a000..86695eab 100644
--- a/src/insert_completer.hh
+++ b/src/insert_completer.hh
@@ -1,15 +1,18 @@
#ifndef insert_completer_hh_INCLUDED
#define insert_completer_hh_INCLUDED
-#include "buffer.hh"
#include "option_manager.hh"
#include "display_buffer.hh"
+#include "vector.hh"
#include "optional.hh"
namespace Kakoune
{
+class Buffer;
+struct Key;
+
struct InsertCompleterDesc
{
enum Mode
@@ -82,16 +85,13 @@ private:
void menu_show();
- using CandidateList = InsertCompletion::CandidateList;
-
const Context& m_context;
OptionManager& m_options;
InsertCompletion m_completions;
- CandidateList m_matching_candidates;
int m_current_candidate = -1;
using CompleteFunc = InsertCompletion (const Buffer&, ByteCoord, const OptionManager& options);
- std::function<CompleteFunc> m_explicit_completer;
+ CompleteFunc* m_explicit_completer = nullptr;
};
}