Skip to content

Commit

Permalink
remove unnecessary conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Dec 9, 2024
1 parent 4baddd6 commit a2127a4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions R/rstudioapi.R
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,7 @@ stream_selection_impl <- function(selection, context, pal, n_lines_orig, remaind
# there may be more lines in the output than there are in the range
n_selection <- selection$range$end[[1]] - selection$range$start[[1]]
n_lines_res <- nchar(gsub("[^\n]+", "", output_padded %||% output_lines))
if (n_selection < n_lines_res) {
selection$range$end[["row"]] <- selection$range$start[["row"]] + n_lines_res
}
selection$range$end[["row"]] <- selection$range$start[["row"]] + n_lines_res
})

# once the generator is finished, modify the range with the
Expand Down

0 comments on commit a2127a4

Please sign in to comment.