Skip to content

Fix so rTerm is undefined when deleting terminal#403

Merged
renkun-ken merged 1 commit intoREditorSupport:masterfrom
andycraig:delete-terminal
Aug 23, 2020
Merged

Fix so rTerm is undefined when deleting terminal#403
renkun-ken merged 1 commit intoREditorSupport:masterfrom
andycraig:delete-terminal

Conversation

@andycraig
Copy link
Copy Markdown
Collaborator

Fixes #402

What problem did you solve?

If session watcher is on but R: Always Use Active Terminal is off, closing an R terminal created by vscode-R does not undefine rTerm. This means that future commands that should create a new R terminal instead do nothing.

How can I check this pull request?

  1. Enable setting R: Session Watcher
  2. Disable setting R: Always Use Active Terminal
  3. Create file temp.R with content x <- 1
  4. Command R: Run Selection/Line
  5. Observe R Interactive terminal is created and line is sent to terminal
  6. Close R Interactive by clicking on the terminal trashcan icon. Terminal should now be 1: cmd (if on Windows)
  7. Command R: Run Selection/Line

With PR

Terminal R Interactive is created and line is sent to terminal.

Before PR

Nothing happens.

Notes

I came up with this after putting a breakpoint on the original rTerm = undefined line and discovering that it was never reached.

@andycraig andycraig requested a review from renkun-ken August 23, 2020 03:46
@renkun-ken
Copy link
Copy Markdown
Member

LGTM

@renkun-ken renkun-ken merged commit 67ea4de into REditorSupport:master Aug 23, 2020
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.

Can't recreate R Interactive with session watcher and not always using active terminal

2 participants