diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-06-15 16:04:38 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-06-15 16:04:38 +0100 |
| commit | 205e8b2889b0c2edb482854788c66db582e79fd1 (patch) | |
| tree | 6c2b3f03d6682b445aa79d31e48c472f95bd7446 /src/highlighter_group.hh | |
| parent | e0cd8ad93c01fc451cf93507f56597db0d0a500d (diff) | |
Refactor highlighter command completions
Diffstat (limited to 'src/highlighter_group.hh')
| -rw-r--r-- | src/highlighter_group.hh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/highlighter_group.hh b/src/highlighter_group.hh index 0b01d29b..94dbad12 100644 --- a/src/highlighter_group.hh +++ b/src/highlighter_group.hh @@ -24,11 +24,11 @@ public: void append(HighlighterAndId&& hl); void remove(StringView id); - HighlighterGroup& get_group(StringView path, Codepoint path_separator = 0); - HighlighterFunc get_highlighter(StringView path, Codepoint path_separator = 0) const; + HighlighterGroup& get_group(StringView path); + HighlighterFunc get_highlighter(StringView path) const; - CandidateList complete_id(StringView prefix, ByteCount cursor_pos) const; - CandidateList complete_group_id(StringView prefix, ByteCount cursor_pos) const; + Completions complete_id(StringView path, ByteCount cursor_pos) const; + Completions complete_group_id(StringView path, ByteCount cursor_pos) const; private: id_map<HighlighterFunc> m_highlighters; @@ -53,8 +53,11 @@ public: m_callback(m_groups, context, flags, display_buffer); } - HighlighterGroup& get_group(StringView path, Codepoint path_separator = 0); - HighlighterFunc get_highlighter(StringView path, Codepoint path_separator = 0) const; + HighlighterGroup& get_group(StringView path); + HighlighterFunc get_highlighter(StringView path) const; + + Completions complete_id(StringView path, ByteCount cursor_pos) const; + Completions complete_group_id(StringView path, ByteCount cursor_pos) const; protected: Callback m_callback; |
