posit-dev / positron

Positron, a next-generation data science IDE
Other
1.38k stars 42 forks source link

The `options(continue = " ")` in `.Rprofile` does not take effect in Console. #3845

Open payam-delfi opened 2 days ago

payam-delfi commented 2 days ago

Positron Version:

Positron Version: 2024.06.1 (Universal) build 27
Code - OSS Version: 1.90.0
Commit: a893e5b282612ccb2200102957ac38d3c14e5196
Date: 2024-06-26T02:08:06.673Z
Electron: 29.4.0
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin arm64 23.4.0

Steps to reproduce the issue:

  1. Add options(continue = " ") to ~/.Rprofile.
  2. Restart R session.
  3. Run a multi-line command:
mtcars |> 
  ggplot2::ggplot(ggplot2::aes(x = mpg)) +
  ggplot2::geom_histogram()

What did you expect to happen?

I expect the continue lines in console to be blanks rather than the default +. This expected behavior appears in RStudio, but not in Positron.

Want:

> mtcars |> 
   ggplot2::ggplot(ggplot2::aes(x = mpg)) +
   ggplot2::geom_histogram()

Got:

> mtcars |> 
+   ggplot2::ggplot(ggplot2::aes(x = mpg)) +
+   ggplot2::geom_histogram()

Were there any error messages in the output or Developer Tools console?

None.

DavisVaughan commented 2 days ago

It looks like anything besides " " works, so possibly there is some trimming of whitespace that is done on the frontend side, and then maybe we "throw out" things that look like the empty string?