Skip to content

Commit

Permalink
a few more newlines reflecting structure
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Dec 9, 2024
1 parent 0cf809f commit 31a189e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/rstudioapi.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,10 @@ stream_selection_impl <- function(selection, context, pal, n_lines_orig, remaind
selection_text <- selection[["text"]]
output_lines <- character(0)
stream <- pal$clone()[[".__enclos_env__"]][["private"]]$.stream(selection_text)

coro::loop(for (chunk in stream) {
if (identical(chunk, "")) {next}

output_lines <- paste(output_lines, chunk, sep = "")
n_lines <- nchar(gsub("[^\n]+", "", output_lines)) + 1
output_padded <- paste0(
Expand Down

0 comments on commit 31a189e

Please sign in to comment.