-
Notifications
You must be signed in to change notification settings - Fork 138
Description
From @Hong-Revo in microsoft/vscode#79559
- VSCode Version: 1.37.1 (system)
- OS Version: Windows 10 Pro 1903
There seems to be a (rather specific) bug in how character vectors are tokenized. When you have c("a", "b", ...) as a default function argument, the strings except for the first one are not treated as text:
It only appears to happen when the c function is used; you can see that list doesn't have this problem. Similarly, if you have a character vector anywhere other than as a default function arg, it's coloured correctly.
Steps to reproduce
- Type
f <- function(a=c("a", "b", "c")) {}in an R editing window. - Note the colour of the strings.
The first string has the following scopes:
string.quoted.double.r
meta.function.parameters.r
meta.function.r
meta.function.r
source.r
The subsequent strings have the following scopes:
variable.parameter.r
meta.function.parameters.r
meta.function.r
meta.function.r
source.r
