Module: util/targetUtils
Functions
createThatMark
▸ createThatMark(targets
, ranges?
): SelectionWithEditor
[]
Parameters
Name | Type |
---|---|
targets | Target [] |
ranges? | Range [] |
Returns
Defined in
util/targetUtils.ts:88
ensureSingleEditor
▸ ensureSingleEditor(targets
): TextEditor
Parameters
Name | Type |
---|---|
targets | Target [] |
Returns
Defined in
util/targetUtils.ts:7
ensureSingleTarget
▸ ensureSingleTarget(targets
): Target
Parameters
Name | Type |
---|---|
targets | Target [] |
Returns
Defined in
util/targetUtils.ts:21
getContentRange
▸ getContentRange(target
): Range
Parameters
Name | Type |
---|---|
target | Target |
Returns
Defined in
util/targetUtils.ts:84
getOutsideOverflow
▸ getOutsideOverflow(editor
, insideRange
, outsideRange
): Range
[]
Get the possible leading and trailing overflow ranges of the outside range compared to the inside range
Parameters
Name | Type |
---|---|
editor | TextEditor |
insideRange | Range |
outsideRange | Range |
Returns
Range
[]
Defined in
util/targetUtils.ts:67
groupTargetsForEachEditor
▸ groupTargetsForEachEditor(targets
): [TextEditor
, Target
[]][]
Parameters
Name | Type |
---|---|
targets | Target [] |
Returns
[TextEditor
, Target
[]][]
Defined in
util/targetUtils.ts:48
runForEachEditor
▸ runForEachEditor<T
, U
>(targets
, getEditor
, func
): Promise
<U
[]>
Type parameters
Name |
---|
T |
U |
Parameters
Name | Type |
---|---|
targets | T [] |
getEditor | (target : T ) => TextEditor |
func | (editor : TextEditor , editorTargets : T []) => Promise <U > |
Returns
Promise
<U
[]>
Defined in
util/targetUtils.ts:29
runOnTargetsForEachEditor
▸ runOnTargetsForEachEditor<T
>(targets
, func
): Promise
<T
[]>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
targets | Target [] |
func | (editor : TextEditor , targets : Target []) => Promise <T > |
Returns
Promise
<T
[]>
Defined in
util/targetUtils.ts:41