man/resolve.selection.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/insert.pipe.R
\name{resolve.selection}
\alias{resolve.selection}
\title{Process selection}
\usage{
resolve.selection(context, position, indentation)
}
\arguments{
\item{context}{Actual document context}
\item{position}{document_range to resolve}
\item{indentation}{value of \code{.rs.readUiPref('num_spaces_for_tab')}}
}
\value{
The list of 3 values:
\describe{
\item{range}{\code{document_range} which will be replaced by
the \code{text}}
\item{text}{new text to replace the \code{range}}
\item{column}{new end of the original selection}
}
}
\description{
Method will resolve one selection according to rules specified
in \code{\link{insert.pipe}}
}
\details{
The returned \code{column} is not the same as the end of the
\code{range}, becuse range will end at the edn of the line. The
\code{column} is important for calculating the expansion or
shinkage of the original range (\code{position}), in the case there
are multiple selections in the file. Next selection could even start
at that very \code{column}.
}