From 622380e029659117e90d932062a44d2889fd7534 Mon Sep 17 00:00:00 2001 From: simonpcouch Date: Mon, 2 Dec 2024 08:46:14 -0600 Subject: [PATCH] remove one trailing newline in final `modifyRange()` --- R/rstudioapi.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/rstudioapi.R b/R/rstudioapi.R index 06461ff..b663e5b 100644 --- a/R/rstudioapi.R +++ b/R/rstudioapi.R @@ -179,7 +179,7 @@ stream_selection_impl <- function(selection, context, pal, n_lines_orig, remaind # unpadded version to remove unneeded newlines rstudioapi::modifyRange( selection$range, - paste0(output_lines, remainder), + string <- sub("\n$", "", paste0(output_lines, remainder)), context$id )