diff --git a/R/rstudioapi.R b/R/rstudioapi.R index 1f21fc6..9518d80 100644 --- a/R/rstudioapi.R +++ b/R/rstudioapi.R @@ -150,7 +150,7 @@ stream_selection_impl <- function(selection, context, pal, n_lines_orig, remaind stream <- pal$clone()[[".__enclos_env__"]][["private"]]$.stream(selection_text) coro::loop(for (chunk in stream) { if (identical(chunk, "")) {next} - output_lines <- paste(output_lines, sub("\n$", "", chunk), sep = "") + output_lines <- paste(output_lines, chunk, sep = "") n_lines <- nchar(gsub("[^\n]+", "", output_lines)) + 1 if (n_lines_orig - n_lines > 0) { output_padded <-