You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes when I send lines or blocks to the console via ctrl+enter without selecting the code, the ending parentheses will be doubled and stop the code from being run:
If the line/block of code is selected this never happens.
I have not managed to reproduce the bug reliably :(
It happens often enough when executing expect_*() within test_that blocks that I assume it it has something todo with the enclosing brackets. It also only happens on the last statement in a block but does also happen when it is the only one:
I have tried to reproduce the bug with similarly nested, more generic functions (also "non-function" with same arguments) but could not get the bug to show up.
Hi @assignUser, thank you for reporting this. This is a weird one.
When this problem happens, if you immediately try to send the same line/block again, does the extra parenthesis appear again?
It looks like you are using radian. I think radian does some autocompletion of parenthesis etc. as well, so it is possible that this is some interaction problem between vscode-R and radian. (Although the fact that the error doesn't occur if you select the code does suggest that this is just due to vscode-R.) Next time this happens, could you try opening a plain R terminal, send the line/block to that, and see whether the extra parenthesis appears?
Extra examples might be useful too. The next few times this happens, if you could paste here the code section from the editor, the code that appears in the console, and indicate where the cursor was when you hit Ctrl-Enter, that would be great.
Since it only seems to occur with radian, I thought of something else. Do you have r.bracketedPaste enabled? If not, try enabling that and see if the problem persists.
I have brackted paste activated. Interestingly, when I turn it off the error now happens more often... so very likely that it is an issue with radians input checks
I also had this problem so I turned off radian.auto.match, just add following code to the radian profile: options(radian.auto_match = FALSE)
But apparently this is only a temporary solution, waiting for someone to open an issue there.
Reacted by Anthony North, Florian, Yun Peng, C. Manuel Bosancianu, PhD, cewinharhar and Cédric Briand
I'm having the same issue. For me this happens particularly often when I have a double quote symbol followed by a closing parenthesis.
")
Then the the line appears in the terminal
c("example", "example")
")
The cursor then is at the beginning of the second line.
I can actually reproduce this error even when the whole line is highlighted. Executing the code repeatedly very fast works some time, but after executing the same line over and over again, at one point the error happens.
More than 50 characters in the execution statement seem to be a problem
Activity
andycraig commentedon Oct 10, 2020
Hi @assignUser, thank you for reporting this. This is a weird one.
When this problem happens, if you immediately try to send the same line/block again, does the extra parenthesis appear again?
It looks like you are using radian. I think radian does some autocompletion of parenthesis etc. as well, so it is possible that this is some interaction problem between vscode-R and radian. (Although the fact that the error doesn't occur if you select the code does suggest that this is just due to vscode-R.) Next time this happens, could you try opening a plain R terminal, send the line/block to that, and see whether the extra parenthesis appears?
Extra examples might be useful too. The next few times this happens, if you could paste here the code section from the editor, the code that appears in the console, and indicate where the cursor was when you hit Ctrl-Enter, that would be great.
assignUser commentedon Oct 10, 2020
I will swicht to plain r-term and try to reproduce the error.
assignUser commentedon Oct 10, 2020
Can not reproduce at all with R.exe so it must be an issue with radian. I will look into it and open an issue there.
andycraig commentedon Oct 10, 2020
@assignUser Thank you for investigating!
Since it only seems to occur with radian, I thought of something else. Do you have
r.bracketedPasteenabled? If not, try enabling that and see if the problem persists.assignUser commentedon Oct 10, 2020
I have brackted paste activated. Interestingly, when I turn it off the error now happens more often... so very likely that it is an issue with radians input checks
YandLiu commentedon Oct 17, 2020
I also had this problem so I turned off radian.auto.match, just add following code to the radian profile:
options(radian.auto_match = FALSE)But apparently this is only a temporary solution, waiting for someone to open an issue there.
flo-schu commentedon Feb 11, 2021
I'm having the same issue. For me this happens particularly often when I have a double quote symbol followed by a closing parenthesis.
")Then the the line appears in the terminal
The cursor then is at the beginning of the second line.
I can actually reproduce this error even when the whole line is highlighted. Executing the code repeatedly very fast works some time, but after executing the same line over and over again, at one point the error happens.
More than 50 characters in the execution statement seem to be a problem
humanfactors commentedon Oct 8, 2021
Has anyone found a solution to this yet? Starting to drive me bonkers. The
")is exactly for me as well.renkun-ken commentedon Oct 8, 2021
Does it still occur with the latest version of radian being used and
r.bracketedPasteenabled in vscode?Yunuuuu commentedon Oct 11, 2021
Still here windows with latest vscode-r and radian. It’s interim and I didn’t find a way to reproduce it firmly.
Yunuuuu commentedon Oct 11, 2021
It incline to occur when I send larger code once at all to radian.
Yunuuuu commentedon Oct 11, 2021
Radian repos has some similar issues like:
first, Second , Third
humanfactors commentedon Oct 12, 2021
The issue resolves with
options(radian.auto_match = FALSE).However, yes the issue occurs under latest build of and
radian version: 0.5.11andikuyadeu.r 2.3.1, withr.bracketedPasteenabled.randy3k commentedon Oct 12, 2021
As far as I know, bracket paste mode is not supported by VSCode terminal on Windows.