summaryrefslogtreecommitdiff
path: root/src/completion.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-06-15 16:04:38 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-06-15 16:04:38 +0100
commit205e8b2889b0c2edb482854788c66db582e79fd1 (patch)
tree6c2b3f03d6682b445aa79d31e48c472f95bd7446 /src/completion.hh
parente0cd8ad93c01fc451cf93507f56597db0d0a500d (diff)
Refactor highlighter command completions
Diffstat (limited to 'src/completion.hh')
-rw-r--r--src/completion.hh6
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