resolve.selection: Process selection

Description Usage Arguments Details Value

View source: R/insert.pipe.R

Description

Method will resolve one selection according to rules specified in insert.pipe

Usage

1
resolve.selection(context, position, indentation)

Arguments

context

Actual document context

position

document_range to resolve

indentation

value of .rs.readUiPref('num_spaces_for_tab')

Details

The returned column is not the same as the end of the range, becuse range will end at the edn of the line. The column is important for calculating the expansion or shinkage of the original range (position), in the case there are multiple selections in the file. Next selection could even start at that very column.

Value

The list of 3 values:

range

document_range which will be replaced by the text

text

new text to replace the range

column

new end of the original selection


sfr/RStudio-Addin-Snippets documentation built on May 29, 2019, 8:01 p.m.