Skip to content

Commit

Permalink
fix: Use prompts from {prompt} to avoid odd terminal resizing.
Browse files Browse the repository at this point in the history
  • Loading branch information
csgillespie committed Jun 5, 2023
1 parent 092d313 commit 16633e2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: rprofile
Title: My Rprofile in a Handy R Package
Version: 0.1.12
Version: 0.1.13
Authors@R:
person(given = "Colin",
family = "Gillespie",
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# rprofile 0.1.13 _2023-06-05_
* fix: Use prompts from {prompt} to avoid odd terminal resizing.

# rprofile 0.1.12 _2022-11-08_
* Add `stripspace()` function for cleaning files
* Remove `check.bounds` option - too noisy
Expand Down
3 changes: 2 additions & 1 deletion R/set-terminal.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ set_terminal = function(rdoc = TRUE, colorout = TRUE,
if (isTRUE(colorout) && requireNamespace("colorout", quietly = TRUE)) {
base::library("colorout")
}
prompt::set_prompt(rprofile_prompt)
# For some reason width is out on normal R terminals
prompt::set_prompt(prompt::prompt_git)
}

#' @rdname is_terminal
Expand Down
2 changes: 1 addition & 1 deletion R/startup-options.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ set_startup_options = function(
digits = 4L,
show.signif.stars = FALSE, #nolint
useFancyQuotes = FALSE, #nolint
width = (cli::console_width() + 17L),
width = cli::console_width(),
Ncpus = max(1L, parallel::detectCores() - 1L),
continue = " ",
max.print = 100L, # Avoid blow up
Expand Down

0 comments on commit 16633e2

Please sign in to comment.