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/completion.hh | |
| parent | e0cd8ad93c01fc451cf93507f56597db0d0a500d (diff) | |
Refactor highlighter command completions
Diffstat (limited to 'src/completion.hh')
| -rw-r--r-- | src/completion.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/completion.hh b/src/completion.hh index 6cda2e6c..afaf6fbc 100644 --- a/src/completion.hh +++ b/src/completion.hh @@ -47,5 +47,11 @@ inline Completions complete_nothing(const Context& context, CompletionFlags, Completions shell_complete(const Context& context, CompletionFlags, StringView, ByteCount cursor_pos); +inline Completions offset_pos(Completions completion, ByteCount offset) +{ + return { completion.start + offset, completion.end + offset, + std::move(completion.candidates) }; +} + } #endif // completion_hh_INCLUDED |
