Skip to content

Commit

Permalink
allign with previous line when no selected text
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlue committed Dec 29, 2021
1 parent 1811a06 commit 6c6d717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/align_assign.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ capture <- function() {

captureArea <- function(capture) {
# Find range
range_start <- capture$selection[[1L]]$range$start[[1L]]
range_end <- capture$selection[[1L]]$range$end[[1L]]
range_start <- min(range_end-1,capture$selection[[1L]]$range$start[[1L]])

# Dump contents and use highlighted lines as names.
contents <- capture$contents[range_start:range_end]
Expand Down

0 comments on commit 6c6d717

Please sign in to comment.