matterhorn-50200.11.0: Terminal client for the Mattermost chat system

Safe HaskellNone
LanguageHaskell2010

Matterhorn.State.Autocomplete

Synopsis

Documentation

data AutocompleteContext Source #

Constructors

AutocompleteContext 

Fields

  • autocompleteManual :: Bool

    Whether the autocompletion was manual (True) or automatic (False). The automatic case is the case where the autocomplete lookups and UI are triggered merely by entering some initial text (such as "@"). The manual case is the case where the autocomplete lookups and UI are triggered explicitly by a user's TAB keypress.

  • autocompleteFirstMatch :: Bool

    Once the results of the autocomplete lookup are available, this flag determines whether the user's input is replaced immediately with the first available match (True) or not (False).

checkForAutocompletion :: AutocompleteContext -> MH () Source #

Check for whether the currently-edited word in the message editor should cause an autocompletion UI to appear. If so, initiate a server query or local cache lookup to present the completion alternatives for the word at the cursor.