Skip to main content

Interface: EditWithRangeUpdater

typings/Types.EditWithRangeUpdater

Hierarchy

  • Edit

    EditWithRangeUpdater

Properties

isReplace

Optional isReplace: boolean

If this edit is an insertion, ie the range has zero length, then this field can be set to true to indicate that any adjacent empty selection should not be shifted to the right, as would normally happen with an insertion. This is equivalent to the distinction in a vscode edit builder between doing a replace with an empty range versus doing an insert.

Inherited from

Edit.isReplace

Defined in

typings/Types.ts:216


range

range: Range

Inherited from

Edit.range

Defined in

typings/Types.ts:204


text

text: string

Inherited from

Edit.text

Defined in

typings/Types.ts:205

Methods

updateRange

updateRange(range): Range

This function will be passed the resulting range containing text after applying the edit, and should return a new range which excludes any delimiters that were inserted.

Parameters

NameType
rangeRange

Returns

Range

Defined in

typings/Types.ts:225