Skip to content

Fix send code for newlines and Radian #114 #117#119

Merged
Ikuyadeu merged 2 commits intoREditorSupport:masterfrom
andycraig:issue-114-117-newlines-radian
Aug 18, 2019
Merged

Fix send code for newlines and Radian #114 #117#119
Ikuyadeu merged 2 commits intoREditorSupport:masterfrom
andycraig:issue-114-117-newlines-radian

Conversation

@andycraig
Copy link
Copy Markdown
Collaborator

Fixes #114
Fixes #117

What problem did you solve?

  1. When sending code to console (R or Radian), blank lines before the code chunk are also sent (Newlines when sending code to Radian #114).

  2. When sending code to Radian console, identation is odd (Messy indentation in console when sending text to Radian #117).

This PR adds a new setting, r.bracketedPaste, which enables bracketed paste mode to fix the indentation problems with Radian. This also works with the R console but not with readline 6 or before, so I have set it to false by default.

(If you have)Screenshot

R with bracketedPaste set to false, using the command R: Run Selection/Line with the cursor on line 3 - note that there is no blank prompt in the console BEFORE

> f <- function(x) {

which shows that no blank lines have been sent:

r_new

Radian with bracketedPaste set to true, using the command R: Run Selection/Line in Active Terminal with the cursor on line 3 - note lack of blank prompt, and correct indentation:

radian_good

@randy3k Could you look at my bracketed paste mode code (lines 106-107 of src/extension.ts)? I think it is fine but you have a lot more experience with bracketed paste mode than I do. Thank you!

@randy3k
Copy link
Copy Markdown
Member

randy3k commented Aug 17, 2019

It looks perfect to me, except that I only have a little experience with VS Code extensions.

@andycraig
Copy link
Copy Markdown
Collaborator Author

@randy3k Great, thank you. If the bracketed paste mode part looks fine then it should be okay.

@Ikuyadeu This is ready to be merged if you are happy with it.

@Ikuyadeu
Copy link
Copy Markdown
Member

Ikuyadeu commented Aug 18, 2019

@andycraig Thank you for your contribution!
Also, you changed README.md and bugreport.md. It is helpful for me.
@randy3k Thank you for your review!

@Ikuyadeu Ikuyadeu merged commit 69894cb into REditorSupport:master Aug 18, 2019
@andycraig
Copy link
Copy Markdown
Collaborator Author

@Ikuyadeu Thank you!

@andycraig
Copy link
Copy Markdown
Collaborator Author

Hi @Ikuyadeu, when you have time would you be able to do a release with this change?

@Ikuyadeu
Copy link
Copy Markdown
Member

@andycraig Sorry, I'm late. I just released the new version now.

@andycraig
Copy link
Copy Markdown
Collaborator Author

Great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Messy indentation in console when sending text to Radian Newlines when sending code to Radian

3 participants