From 6579be06ccc623ad7e4644a78325deb17338ec65 Mon Sep 17 00:00:00 2001 From: Elin Waring Date: Fri, 26 Jul 2019 17:22:35 -0400 Subject: [PATCH] Remove unused function. --- NAMESPACE | 1 - R/selection.R | 23 ----------------------- man/make_js_listener.Rd | 26 -------------------------- 3 files changed, 50 deletions(-) delete mode 100644 man/make_js_listener.Rd diff --git a/NAMESPACE b/NAMESPACE index 1969a8c..49fb823 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -14,7 +14,6 @@ export(do_update_document) export(error_check) export(get_codes) export(import_project_data) -export(make_js_listener) export(parse_one_document) export(parse_qcodes) export(qcode) diff --git a/R/selection.R b/R/selection.R index fa7b705..e5f69a5 100644 --- a/R/selection.R +++ b/R/selection.R @@ -1,26 +1,3 @@ -#' Makes a bit of javascript that lets us listen in on the selection -#' -#' @param editor_name The name given the editor -#' @param position The starting row and column location -#' @param new_text The new text including the code markup -#' @param selected_text The text to be marked with a code or codes -#' -#' @return javascript text -#' @export -#' -#' @examples -#' -make_js_listener <- function(editor_name, position, new_text, selected_text){ - - row_num <- position$row + 1 - col_num <- position$column + (nchar(new_text) - nchar(selected_text)) - - script <- paste0("editor__",editor_name,".focus(); editor__", - editor_name,".gotoLine(", row_num, ",", col_num, ");") - - script -} - #' Adds codes surrounding the selected text #' #' @param selection The selection of text to be coded diff --git a/man/make_js_listener.Rd b/man/make_js_listener.Rd deleted file mode 100644 index 8532c4b..0000000 --- a/man/make_js_listener.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/selection.R -\name{make_js_listener} -\alias{make_js_listener} -\title{Makes a bit of javascript that lets us listen in on the selection} -\usage{ -make_js_listener(editor_name, position, new_text, selected_text) -} -\arguments{ -\item{editor_name}{The name given the editor} - -\item{position}{The starting row and column location} - -\item{new_text}{The new text including the code markup} - -\item{selected_text}{The text to be marked with a code or codes} -} -\value{ -javascript text -} -\description{ -Makes a bit of javascript that lets us listen in on the selection -} -\examples{ - -}