A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
a11::flow::CompleteResult Struct Reference

What may be written at an offset, and the word already typed there. More...

#include <cpp/a11/flow/complete.h>

Public Attributes

std::vector< Proposal > proposals
 
std::string prefix
 The partial word the caret is in, if any.
 
size_t prefix_start = 0
 Where that word starts, so an editor knows what a proposal replaces.
 

Detailed Description

What may be written at an offset, and the word already typed there.

Member Data Documentation

◆ prefix

std::string a11::flow::CompleteResult::prefix

The partial word the caret is in, if any.

Not filtered on here: every frontend that consumes this filters and sorts by its own rules, and one that filtered twice would drop what a fuzzy matcher would have kept.

◆ prefix_start

size_t a11::flow::CompleteResult::prefix_start = 0

Where that word starts, so an editor knows what a proposal replaces.

The caret itself when there is no partial word, which makes [prefix_start, caret) the range a proposal replaces in every case rather than only when something has been typed. It defaulted to zero, and that range is the whole document up to the caret: taking a proposal at a position where nothing had been typed yet deleted everything in front of it.

◆ proposals

std::vector<Proposal> a11::flow::CompleteResult::proposals

The documentation for this struct was generated from the following file: