Skip to content

Commit 387a9fc

Browse files
authored
Don't refresh files in positron (#2167)
Since it currently steals focus.
1 parent eb39d20 commit 387a9fc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

R/utils.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@ rstudio_tickle <- function() {
3737
}
3838

3939
rstudioapi::executeCommand("vcsRefresh")
40-
rstudioapi::executeCommand("refreshFiles")
40+
if (!is_positron()) {
41+
rstudioapi::executeCommand("refreshFiles")
42+
}
43+
}
44+
45+
is_positron <- function() {
46+
nzchar(Sys.getenv("POSITRON", ""))
4147
}
4248

4349
first_upper <- function(x) {

0 commit comments

Comments
 (0)