struct TermBuf::Completion::Request

Overview

What is being completed. Indices are cluster indices into the line, the same ones LineBuffer counts in.

Defined in:

termbuf/widgets/completion.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(text : String, cursor : Int32, word : String, range : Range(Int32, Int32)) #

[View source]

Instance Method Detail

def clone #

[View source]
def copy_with(text _text = @text, cursor _cursor = @cursor, word _word = @word, range _range = @range) #

[View source]
def cursor : Int32 #

Where the cursor is.


def range : Range(Int32, Int32) #

Where that word sits, which is what a Result replaces by default.


def text : String #

The whole line, since a completion often depends on what came before.


def word : String #

The word the field thinks is being completed.