Skip to content

Commit

Permalink
Merge 6bd3e0f into 6dd25a5
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil authored Oct 12, 2022
2 parents 6dd25a5 + 6bd3e0f commit 1f582cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/addins.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ style_active_file <- function() {
paste0(ensure_last_n_empty(out), collapse = "\n"),
id = context$id
)
if (save_after_styling_is_active() == TRUE && context$path != "") {
if (save_after_styling_is_active() && context$path != "") {
rstudioapi::documentSave(context$id)
}
rstudioapi::setCursorPosition(context$selection[[1L]]$range)
Expand Down Expand Up @@ -138,7 +138,7 @@ style_selection <- function() {
), collapse = "\n"),
id = context$id
)
if (save_after_styling_is_active() == TRUE && context$path != "") {
if (save_after_styling_is_active() && context$path != "") {
invisible(rstudioapi::documentSave(context$id))
}
}
Expand Down
2 changes: 1 addition & 1 deletion R/stylerignore.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ apply_stylerignore <- function(flattened_pd) {
# cannot rely on flattened_pd$text == option_read("styler.ignore_start")
# because if the marker logic is not correct (twice off in a row), we'll
# get it wrong.
to_ignore <- flattened_pd$stylerignore == TRUE
to_ignore <- flattened_pd$stylerignore
not_first <- flattened_pd$stylerignore == lag(
flattened_pd$stylerignore,
default = FALSE
Expand Down

0 comments on commit 1f582cb

Please sign in to comment.