Merge remote-tracking branch 'origin/master' into misolori/icon-font-breakpoints

This commit is contained in:
Miguel Solorio 2019-11-12 14:33:14 -08:00
commit 4de7b940f5
274 changed files with 5118 additions and 2055 deletions

17
.github/commands.yml vendored
View file

@ -96,7 +96,7 @@
{
type: 'comment',
name: 'confirmationPending',
allowUsers: ['cleidigh', 'usernamehw'],
allowUsers: ['cleidigh', 'usernamehw', 'gjsjohnmurray', 'IllusionMH'],
action: 'updateLabels',
addLabel: 'confirmation-pending',
removeLabel: 'confirmed'
@ -116,6 +116,14 @@
addLabel: 'needs more info',
comment: "Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines. Please take the time to review these and update the issue.\n\nHappy Coding!"
},
{
type: 'label',
name: '*needs more info',
action: 'updateLabels',
addLabel: 'needs more info',
removeLabel: '*needs more info',
comment: "Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines. Please take the time to review these and update the issue.\n\nHappy Coding!"
},
{
type: 'comment',
name: 'a11ymas',
@ -123,5 +131,12 @@
action: 'updateLabels',
addLabel: 'a11ymas'
},
{
type: 'label',
name: '*needs more info',
action: 'updateLabels',
addLabel: 'needs more info',
removeLabel: '*needs more info'
},
]
}

View file

@ -31,7 +31,7 @@
},
{
"name": "ms-vscode.references-view",
"version": "0.0.34",
"version": "0.0.35",
"repo": "https://github.com/Microsoft/vscode-reference-view",
"metadata": {
"id": "dc489f46-520d-4556-ae85-1f9eab3c412d",

View file

@ -54,7 +54,7 @@ function createCompile(src: string, build: boolean, emitError?: boolean) {
const input = es.through();
const output = input
.pipe(utf8Filter)
.pipe(bom())
.pipe(bom()) // this is required to preserve BOM in test files that loose it otherwise
.pipe(utf8Filter.restore)
.pipe(tsFilter)
.pipe(util.loadSourcemaps())

View file

@ -50,6 +50,10 @@
"name": "vs/workbench/contrib/comments",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/contrib/testCustomEditors",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/contrib/debug",
"project": "vscode-workbench"
@ -198,6 +202,10 @@
"name": "vs/workbench/services/actions",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/services/authToken",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/services/bulkEdit",
"project": "vscode-workbench"

View file

@ -957,10 +957,10 @@ Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\Applications\{#ExeBas
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\Applications\{#ExeBasename}.exe\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\resources\app\resources\win32\default.ico"
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\Applications\{#ExeBasename}.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%1"""
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\*\shell\{#RegValueName}"; ValueType: expandsz; ValueName: ""; ValueData: "Open w&ith {#ShellNameShort}"; Tasks: addcontextmenufiles; Flags: uninsdeletekey
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\*\shell\{#RegValueName}"; ValueType: expandsz; ValueName: ""; ValueData: "{cm:OpenWithCodeContextMenu, {#ShellNameShort}}"; Tasks: addcontextmenufiles; Flags: uninsdeletekey
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\*\shell\{#RegValueName}"; ValueType: expandsz; ValueName: "Icon"; ValueData: "{app}\{#ExeBasename}.exe"; Tasks: addcontextmenufiles
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\*\shell\{#RegValueName}\command"; ValueType: expandsz; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%1"""; Tasks: addcontextmenufiles
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\directory\shell\{#RegValueName}"; ValueType: expandsz; ValueName: ""; ValueData: "Open w&ith {#ShellNameShort}"; Tasks: addcontextmenufolders; Flags: uninsdeletekey
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\directory\shell\{#RegValueName}"; ValueType: expandsz; ValueName: ""; ValueData: "{cm:OpenWithCodeContextMenu, {#ShellNameShort}}"; Tasks: addcontextmenufolders; Flags: uninsdeletekey
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\directory\shell\{#RegValueName}"; ValueType: expandsz; ValueName: "Icon"; ValueData: "{app}\{#ExeBasename}.exe"; Tasks: addcontextmenufolders
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\directory\shell\{#RegValueName}\command"; ValueType: expandsz; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%V"""; Tasks: addcontextmenufolders
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\directory\background\shell\{#RegValueName}"; ValueType: expandsz; ValueName: ""; ValueData: "Open w&ith {#ShellNameShort}"; Tasks: addcontextmenufolders; Flags: uninsdeletekey

View file

@ -5,4 +5,5 @@ AssociateWithFiles=%1 als Editor f
AddToPath=Zu PATH hinzufügen (nach dem Neustart verfügbar)
RunAfter=%1 nach der Installation ausführen
Other=Andere:
SourceFile=%1-Quelldatei
SourceFile=%1-Quelldatei
OpenWithCodeContextMenu=Mit %1 öffnen

View file

@ -5,4 +5,5 @@ AssociateWithFiles=Register %1 as an editor for supported file types
AddToPath=Add to PATH (requires shell restart)
RunAfter=Run %1 after installation
Other=Other:
SourceFile=%1 Source File
SourceFile=%1 Source File
OpenWithCodeContextMenu=Open with %1

View file

@ -5,4 +5,5 @@ AssociateWithFiles=Registrar %1 como editor para tipos de archivo admitidos
AddToPath=Agregar a PATH (disponible después de reiniciar)
RunAfter=Ejecutar %1 después de la instalación
Other=Otros:
SourceFile=Archivo de origen %1
SourceFile=Archivo de origen %1
OpenWithCodeContextMenu=Abrir con %1

View file

@ -5,4 +5,5 @@ AssociateWithFiles=Inscrire %1 en tant qu'
AddToPath=Ajouter à PATH (disponible après le redémarrage)
RunAfter=Exécuter %1 après l'installation
Other=Autre :
SourceFile=Fichier source %1
SourceFile=Fichier source %1
OpenWithCodeContextMenu=Ouvrir avec %1

View file

@ -5,4 +5,5 @@ AssociateWithFiles=%1 regisztr
AddToPath=Hozzáadás a PATH-hoz (újraindítás után lesz elérhető)
RunAfter=%1 indítása a telepítés után
Other=Egyéb:
SourceFile=%1 forrásfájl
SourceFile=%1 forrásfájl
OpenWithCodeContextMenu=Megnyitás a következővel: %1

View file

@ -5,4 +5,5 @@ AssociateWithFiles=Registra %1 come editor per i tipi di file supportati
AddToPath=Aggiungi a PATH (disponibile dopo il riavvio)
RunAfter=Esegui %1 dopo l'installazione
Other=Altro:
SourceFile=File di origine %1
SourceFile=File di origine %1
OpenWithCodeContextMenu=Apri con %1

View file

@ -5,4 +5,5 @@ AssociateWithFiles=
AddToPath=PATH への追加(再起動後に使用可能)
RunAfter=インストール後に %1 を実行する
Other=その他:
SourceFile=%1 ソース ファイル
SourceFile=%1 ソース ファイル
OpenWithCodeContextMenu=%1 で開く

View file

@ -5,4 +5,5 @@ AssociateWithFiles=%1
AddToPath=PATH에 추가(다시 시작한 후 사용 가능)
RunAfter=설치 후 %1 실행
Other=기타:
SourceFile=%1 원본 파일
SourceFile=%1 원본 파일
OpenWithCodeContextMenu=%1(으)로 열기

View file

@ -5,4 +5,5 @@ AssociateWithFiles=Registre %1 como um editor para tipos de arquivos suportados
AddToPath=Adicione em PATH (disponível após reiniciar)
RunAfter=Executar %1 após a instalação
Other=Outros:
SourceFile=Arquivo Fonte %1
SourceFile=Arquivo Fonte %1
OpenWithCodeContextMenu=Abrir com %1

View file

@ -5,4 +5,5 @@ AssociateWithFiles=
AddToPath=Добавить в PATH (доступно после перезагрузки)
RunAfter=Запустить %1 после установки
Other=Другое:
SourceFile=Èñõîäíûé ôàéë %1
SourceFile=Èñõîäíûé ôàéë %1
OpenWithCodeContextMenu=Îòêðûòü ñ ïîìîùüþ %1

View file

@ -5,4 +5,5 @@ AssociateWithFiles=%1 uygulamas
AddToPath=PATH'e ekle (yeniden başlattıktan sonra kullanılabilir)
RunAfter=Kurulumdan sonra %1 uygulamasını çalıştır.
Other=Diğer:
SourceFile=%1 Kaynak Dosyası
SourceFile=%1 Kaynak Dosyası
OpenWithCodeContextMenu=%1 İle Aç

View file

@ -5,4 +5,5 @@ AssociateWithFiles=
AddToPath=添加到 PATH (重启后生效)
RunAfter=安装后运行 %1
Other=其他:
SourceFile=%1 源文件
SourceFile=%1 源文件
OpenWithCodeContextMenu=通过 %1 打开

View file

@ -5,4 +5,5 @@ AssociateWithFiles=
AddToPath=加入 PATH 中 (重新啟動後生效)
RunAfter=安裝後執行 %1
Other=其他:
SourceFile=%1 ㄓ方郎<E696B9>
SourceFile=%1 來源檔案
OpenWithCodeContextMenu=以 %1 開啟

View file

@ -6,11 +6,11 @@
"git": {
"name": "jeff-hykin/cpp-textmate-grammar",
"repositoryUrl": "https://github.com/jeff-hykin/cpp-textmate-grammar",
"commitHash": "d937b80a19706d518e5fe52357d7c50d34a26e60"
"commitHash": "fedd206d1b2803f31a278e9b5f098ce4bc76e532"
}
},
"license": "MIT",
"version": "1.14.11",
"version": "1.14.13",
"description": "The files syntaxes/c.json and syntaxes/c++.json were derived from https://github.com/atom/language-c which was originally converted from the C TextMate bundle https://github.com/textmate/c.tmbundle."
},
{

View file

@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/d937b80a19706d518e5fe52357d7c50d34a26e60",
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/fedd206d1b2803f31a278e9b5f098ce4bc76e532",
"name": "C",
"scopeName": "source.c",
"patterns": [
@ -1177,7 +1177,7 @@
]
},
"member_access": {
"match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_int_least64_t|atomic_int_least32_t|pthread_rwlockattr_t|atomic_uint_fast16_t|pthread_mutexattr_t|atomic_int_fast16_t|atomic_uint_fast8_t|atomic_int_fast64_t|atomic_int_least8_t|atomic_int_fast32_t|atomic_int_fast8_t|pthread_condattr_t|atomic_uintptr_t|atomic_ptrdiff_t|pthread_rwlock_t|atomic_uintmax_t|pthread_mutex_t|atomic_intmax_t|atomic_intptr_t|atomic_char32_t|atomic_char16_t|pthread_attr_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_cond_t|pthread_once_t|uint_fast64_t|uint_fast16_t|atomic_size_t|uint_least8_t|int_least64_t|int_least32_t|int_least16_t|pthread_key_t|atomic_ullong|atomic_ushort|uint_fast32_t|atomic_schar|atomic_short|uint_fast8_t|int_fast64_t|int_fast32_t|int_fast16_t|atomic_ulong|atomic_llong|int_least8_t|atomic_uchar|memory_order|suseconds_t|int_fast8_t|atomic_bool|atomic_char|atomic_uint|atomic_long|atomic_int|useconds_t|_Imaginary|uintptr_t|pthread_t|in_addr_t|blksize_t|in_port_t|uintmax_t|uintmax_t|blkcnt_t|uint16_t|unsigned|_Complex|uint32_t|intptr_t|intmax_t|intmax_t|uint64_t|u_quad_t|int64_t|int32_t|ssize_t|caddr_t|clock_t|uint8_t|u_short|swblk_t|segsz_t|int16_t|fixpt_t|daddr_t|nlink_t|qaddr_t|size_t|time_t|mode_t|signed|quad_t|ushort|u_long|u_char|double|int8_t|ino_t|uid_t|pid_t|_Bool|float|dev_t|div_t|short|gid_t|off_t|u_int|key_t|id_t|uint|long|void|char|bool|id_t|int)\\b)[a-zA-Z_]\\w*\\b(?!\\())",
"match": "((?:[a-zA-Z_]\\w*|(?<=\\]|\\)))\\s*)(?:((?:\\.\\*|\\.))|((?:->\\*|->)))((?:[a-zA-Z_]\\w*\\s*(?:(?:(?:\\.\\*|\\.))|(?:(?:->\\*|->)))\\s*)*)\\s*(\\b(?!(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_int_least64_t|atomic_int_least32_t|pthread_rwlockattr_t|atomic_uint_fast16_t|pthread_mutexattr_t|atomic_int_fast16_t|atomic_uint_fast8_t|atomic_int_fast64_t|atomic_int_least8_t|atomic_int_fast32_t|atomic_int_fast8_t|pthread_condattr_t|atomic_uintptr_t|atomic_ptrdiff_t|pthread_rwlock_t|atomic_uintmax_t|pthread_mutex_t|atomic_intmax_t|atomic_intptr_t|atomic_char32_t|atomic_char16_t|pthread_attr_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_cond_t|pthread_once_t|uint_fast64_t|uint_fast16_t|atomic_size_t|uint_least8_t|int_least64_t|int_least32_t|int_least16_t|pthread_key_t|atomic_ullong|atomic_ushort|uint_fast32_t|atomic_schar|atomic_short|uint_fast8_t|int_fast64_t|int_fast32_t|int_fast16_t|atomic_ulong|atomic_llong|int_least8_t|atomic_uchar|memory_order|suseconds_t|int_fast8_t|atomic_bool|atomic_char|atomic_uint|atomic_long|atomic_int|useconds_t|_Imaginary|blksize_t|pthread_t|in_addr_t|uintptr_t|in_port_t|uintmax_t|uintmax_t|blkcnt_t|uint16_t|unsigned|_Complex|uint32_t|intptr_t|intmax_t|intmax_t|uint64_t|u_quad_t|int64_t|int32_t|ssize_t|caddr_t|clock_t|uint8_t|u_short|swblk_t|segsz_t|int16_t|fixpt_t|daddr_t|nlink_t|qaddr_t|size_t|time_t|mode_t|signed|quad_t|ushort|u_long|u_char|double|int8_t|ino_t|uid_t|pid_t|_Bool|float|dev_t|div_t|short|gid_t|off_t|u_int|key_t|id_t|uint|long|void|char|bool|id_t|int)\\b)[a-zA-Z_]\\w*\\b(?!\\())",
"captures": {
"1": {
"name": "variable.other.object.access.c"

File diff suppressed because one or more lines are too long

View file

@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/97fe1e78f90c3234240831c5164374a7353a7a0c",
"version": "https://github.com/jeff-hykin/cpp-textmate-grammar/commit/fedd206d1b2803f31a278e9b5f098ce4bc76e532",
"name": "C++",
"scopeName": "source.cpp",
"patterns": [
@ -966,7 +966,7 @@
]
},
"class_declare": {
"match": "(class)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))?(?:(?:\\&|\\*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*(?:\\&|\\*))?((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?![:{])",
"match": "((?<!\\w)class(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))?(?:(?:\\&|\\*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*(?:\\&|\\*))?((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?![:{])",
"captures": {
"1": {
"name": "storage.type.class.declare.cpp"
@ -3307,7 +3307,7 @@
]
},
"enum_declare": {
"match": "(enum)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))?(?:(?:\\&|\\*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*(?:\\&|\\*))?((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?![:{])",
"match": "((?<!\\w)enum(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))?(?:(?:\\&|\\*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*(?:\\&|\\*))?((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?![:{])",
"captures": {
"1": {
"name": "storage.type.enum.declare.cpp"
@ -12450,7 +12450,7 @@
]
},
"struct_declare": {
"match": "(struct)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))?(?:(?:\\&|\\*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*(?:\\&|\\*))?((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?![:{])",
"match": "((?<!\\w)struct(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))?(?:(?:\\&|\\*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*(?:\\&|\\*))?((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?![:{])",
"captures": {
"1": {
"name": "storage.type.struct.declare.cpp"
@ -15976,7 +15976,7 @@
]
},
"union_declare": {
"match": "(union)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))?(?:(?:\\&|\\*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*(?:\\&|\\*))?((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?![:{])",
"match": "((?<!\\w)union(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))(((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))?(?:(?:\\&|\\*)((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))))*(?:\\&|\\*))?((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))\\b(?!override\\W|override\\$|final\\W|final\\$)((?<!\\w)(?:[a-zA-Z_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))(?:[a-zA-Z0-9_]|(?:\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}))*(?!\\w))((?:(?:(?>\\s+)|(\\/\\*)((?>(?:[^\\*]|(?>\\*+)[^\\/])*)((?>\\*+)\\/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(?=\\S)(?![:{])",
"captures": {
"1": {
"name": "storage.type.union.declare.cpp"

View file

@ -1765,7 +1765,7 @@
"byline": "^5.0.0",
"file-type": "^7.2.0",
"iconv-lite": "^0.4.24",
"jschardet": "^1.6.0",
"jschardet": "2.1.1",
"vscode-extension-telemetry": "0.1.1",
"vscode-nls": "^4.0.0",
"vscode-uri": "^2.0.0",

View file

@ -5,8 +5,6 @@
import * as jschardet from 'jschardet';
jschardet.Constants.MINIMUM_THRESHOLD = 0.2;
function detectEncodingByBOM(buffer: Buffer): string | null {
if (!buffer || buffer.length < 2) {
return null;

View file

@ -1819,8 +1819,11 @@ export class Repository {
}
// Else, remove all lines starting with whitespace followed by `#`.
//TODO: Support core.commentChar
return message.replace(/^\s*#.*$\n?/gm, '').trim();
// TODO: Support core.commentChar
return message.replace(/^(\s*#)(.*)$(\n?)/gm, (_, prefix, content, suffix) => {
// https://github.com/microsoft/vscode/issues/84201#issuecomment-552834814
return /^\d/.test(content) ? `${prefix}${content}${suffix}` : '';
}).trim();
}
async getMergeMessage(): Promise<string | undefined> {

View file

@ -1,11 +0,0 @@
declare module 'jschardet' {
export interface IDetectedMap {
encoding: string,
confidence: number
}
export function detect(buffer: Buffer): IDetectedMap;
export const Constants: {
MINIMUM_THRESHOLD: number,
}
}

View file

@ -176,10 +176,10 @@ isexe@^2.0.0:
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
jschardet@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.6.0.tgz#c7d1a71edcff2839db2f9ec30fc5d5ebd3c1a678"
integrity sha512-xYuhvQ7I9PDJIGBWev9xm0+SMSed3ZDBAmvVjbFR1ZRLAF+vlXcQu6cRI9uAlj81rzikElRVteehwV7DuX2ZmQ==
jschardet@2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-2.1.1.tgz#af6f8fd0b3b0f5d46a8fd9614a4fce490575c184"
integrity sha512-pA5qG9Zwm8CBpGlK/lo2GE9jPxwqRgMV7Lzc/1iaPccw6v4Rhj8Zg2BTyrdmHmxlJojnbLupLeRnaPLsq03x6Q==
json3@3.3.2:
version "3.3.2"

View file

@ -229,8 +229,11 @@ class Preview extends Disposable {
// Show blank image
return encodeURI('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAEElEQVR42gEFAPr/AP///wAI/AL+Sr4t6gAAAABJRU5ErkJggg==');
default:
// Avoid adding cache busting if there is already a query string
if (resource.query) {
return encodeURI(webviewEditor.webview.asWebviewUri(resource).toString(true));
}
return encodeURI(webviewEditor.webview.asWebviewUri(resource).toString(true) + `?version=${version}`);
}
}

File diff suppressed because one or more lines are too long

View file

@ -345,7 +345,7 @@
"mocha-junit-reporter": "^1.17.0",
"mocha-multi-reporters": "^1.1.7",
"ts-loader": "^6.2.1",
"typescript": "^3.6.4",
"typescript": "^3.7.2",
"vscode": "^1.1.10",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.0"

View file

@ -5,6 +5,7 @@
import { getSettings } from './settings';
const codeLineClass = 'code-line';
function clamp(min: number, max: number, value: number) {
return Math.min(max, Math.max(min, value));
@ -25,7 +26,7 @@ const getCodeLineElements = (() => {
return () => {
if (!elements) {
elements = [{ element: document.body, line: 0 }];
for (const element of document.getElementsByClassName('code-line')) {
for (const element of document.getElementsByClassName(codeLineClass)) {
const line = +element.getAttribute('data-line')!;
if (isNaN(line)) {
continue;
@ -75,7 +76,7 @@ export function getLineElementsAtPageOffset(offset: number): { previous: CodeLin
let hi = lines.length - 1;
while (lo + 1 < hi) {
const mid = Math.floor((lo + hi) / 2);
const bounds = lines[mid].element.getBoundingClientRect();
const bounds = getElementBounds(lines[mid]);
if (bounds.top + bounds.height >= position) {
hi = mid;
}
@ -84,7 +85,7 @@ export function getLineElementsAtPageOffset(offset: number): { previous: CodeLin
}
}
const hiElement = lines[hi];
const hiBounds = hiElement.element.getBoundingClientRect();
const hiBounds = getElementBounds(hiElement);
if (hi >= 1 && hiBounds.top > position) {
const loElement = lines[lo];
return { previous: loElement, next: hiElement };
@ -95,6 +96,24 @@ export function getLineElementsAtPageOffset(offset: number): { previous: CodeLin
return { previous: hiElement };
}
function getElementBounds({ element }: CodeLineElement): { top: number, height: number } {
const myBounds = element.getBoundingClientRect();
// Some code line elements may contain other code line elements.
// In those cases, only take the height up to that child.
const codeLineChild = element.querySelector(`.${codeLineClass}`);
if (codeLineChild) {
const childBounds = codeLineChild.getBoundingClientRect();
const height = Math.max(1, (childBounds.top - myBounds.top));
return {
top: myBounds.top,
height: height
};
}
return myBounds;
}
/**
* Attempt to reveal the element for a source line in the editor.
*/
@ -113,7 +132,7 @@ export function scrollToRevealSourceLine(line: number) {
return;
}
let scrollTo = 0;
const rect = previous.element.getBoundingClientRect();
const rect = getElementBounds(previous);
const previousTop = rect.top;
if (next && next.line !== previous.line) {
// Between two elements. Go to percentage offset between them.
@ -130,10 +149,10 @@ export function scrollToRevealSourceLine(line: number) {
export function getEditorLineNumberForPageOffset(offset: number) {
const { previous, next } = getLineElementsAtPageOffset(offset);
if (previous) {
const previousBounds = previous.element.getBoundingClientRect();
const previousBounds = getElementBounds(previous);
const offsetFromPrevious = (offset - window.scrollY - previousBounds.top);
if (next) {
const progressBetweenElements = offsetFromPrevious / (next.element.getBoundingClientRect().top - previousBounds.top);
const progressBetweenElements = offsetFromPrevious / (getElementBounds(next).top - previousBounds.top);
const line = previous.line + progressBetweenElements * (next.line - previous.line);
return clampLine(line);
} else {

View file

@ -223,7 +223,7 @@ export class DynamicMarkdownPreview extends Disposable {
this._register(vscode.window.onDidChangeActiveTextEditor(editor => {
if (editor && isMarkdownFile(editor.document) && !this._locked) {
this.update(editor.document.uri);
this.update(editor.document.uri, false);
}
}));
@ -264,7 +264,6 @@ export class DynamicMarkdownPreview extends Disposable {
this._onDisposeEmitter.fire();
this._onDisposeEmitter.dispose();
this._onDidChangeViewStateEmitter.dispose();
this.editor.dispose();
super.dispose();
}

View file

@ -4528,10 +4528,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
typescript@^3.6.4:
version "3.6.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.4.tgz#b18752bb3792bc1a0281335f7f6ebf1bbfc5b91d"
integrity sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg==
typescript@^3.7.2:
version "3.7.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.2.tgz#27e489b95fa5909445e9fef5ee48d81697ad18fb"
integrity sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ==
uc.micro@^1.0.1:
version "1.0.3"

View file

@ -6,12 +6,12 @@
"git": {
"name": "atom/language-sass",
"repositoryUrl": "https://github.com/atom/language-sass",
"commitHash": "d01d29191ab323fb3cf8bde9df0429f8e07902ff"
"commitHash": "f52ab12f7f9346cc2568129d8c4419bd3d506b47"
}
},
"license": "MIT",
"description": "The file syntaxes/scss.json was derived from the Atom package https://github.com/atom/language-sass which was originally converted from the TextMate bundle https://github.com/alexsancho/SASS.tmbundle.",
"version": "0.62.0"
"version": "0.62.1"
}
],
"version": 1

View file

@ -4,13 +4,19 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/atom/language-sass/commit/d01d29191ab323fb3cf8bde9df0429f8e07902ff",
"version": "https://github.com/atom/language-sass/commit/f52ab12f7f9346cc2568129d8c4419bd3d506b47",
"name": "SCSS",
"scopeName": "source.css.scss",
"patterns": [
{
"include": "#variable_setting"
},
{
"include": "#at_rule_forward"
},
{
"include": "#at_rule_use"
},
{
"include": "#at_rule_include"
},
@ -239,6 +245,55 @@
}
]
},
"at_rule_forward": {
"begin": "\\s*((@)forward\\b)\\s*",
"captures": {
"1": {
"name": "keyword.control.at-rule.forward.scss"
},
"2": {
"name": "punctuation.definition.keyword.scss"
}
},
"end": "\\s*(?=;)",
"name": "meta.at-rule.forward.scss",
"patterns": [
{
"match": "\\b(as|hide|show)\\b",
"name": "keyword.control.operator"
},
{
"match": "\\b([\\w-]+)(\\*)",
"captures": {
"1": {
"name": "entity.other.attribute-name.module.scss"
},
"2": {
"name": "punctuation.definition.wildcard.scss"
}
}
},
{
"match": "\\b[\\w-]+\\b",
"name": "entity.name.function.scss"
},
{
"include": "#variable"
},
{
"include": "#string_single"
},
{
"include": "#string_double"
},
{
"include": "#comment_line"
},
{
"include": "#comment_block"
}
]
},
"at_rule_function": {
"patterns": [
{
@ -336,12 +391,18 @@
"at_rule_include": {
"patterns": [
{
"begin": "(?<=@include)\\s+([\\w-]+)\\s*(\\()",
"begin": "(?<=@include)\\s+(?:([\\w-]+)\\s*(\\.))?([\\w-]+)\\s*(\\()",
"beginCaptures": {
"1": {
"name": "entity.name.function.scss"
"name": "variable.scss"
},
"2": {
"name": "punctuation.access.module.scss"
},
"3": {
"name": "entity.name.function.scss"
},
"4": {
"name": "punctuation.definition.parameters.begin.bracket.round.scss"
}
},
@ -359,12 +420,18 @@
]
},
{
"match": "(?<=@include)\\s+([\\w-]+)",
"match": "(?<=@include)\\s+(?:([\\w-]+)\\s*(\\.))?([\\w-]+)",
"captures": {
"0": {
"name": "meta.at-rule.include.scss"
},
"1": {
"name": "variable.scss"
},
"2": {
"name": "punctuation.access.module.scss"
},
"3": {
"name": "entity.name.function.scss"
}
}
@ -794,6 +861,64 @@
}
]
},
"at_rule_use": {
"begin": "\\s*((@)use\\b)\\s*",
"captures": {
"1": {
"name": "keyword.control.at-rule.use.scss"
},
"2": {
"name": "punctuation.definition.keyword.scss"
}
},
"end": "\\s*(?=;)",
"name": "meta.at-rule.use.scss",
"patterns": [
{
"match": "\\b(as|with)\\b",
"name": "keyword.control.operator"
},
{
"match": "\\b[\\w-]+\\b",
"name": "variable.scss"
},
{
"match": "\\*",
"name": "variable.language.expanded-namespace.scss"
},
{
"include": "#string_single"
},
{
"include": "#string_double"
},
{
"include": "#comment_line"
},
{
"include": "#comment_block"
},
{
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.parameters.begin.bracket.round.scss"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.parameters.end.bracket.round.scss"
}
},
"patterns": [
{
"include": "#function_attributes"
}
]
}
]
},
"at_rule_warn": {
"begin": "\\s*((@)(warn|debug|error)\\b)\\s*",
"captures": {
@ -890,12 +1015,18 @@
"name": "keyword.other.default.scss"
},
"constant_functions": {
"begin": "([\\w-]+)(\\()",
"begin": "(?:([\\w-]+)(\\.))?([\\w-]+)(\\()",
"beginCaptures": {
"1": {
"name": "support.function.misc.scss"
"name": "variable.scss"
},
"2": {
"name": "punctuation.access.module.scss"
},
"3": {
"name": "support.function.misc.scss"
},
"4": {
"name": "punctuation.section.function.scss"
}
},
@ -1050,10 +1181,10 @@
"name": "variable.interpolation.scss",
"patterns": [
{
"include": "#property_values"
"include": "#variable"
},
{
"include": "#variable"
"include": "#property_values"
}
]
},
@ -1118,10 +1249,10 @@
"include": "#map"
},
{
"include": "#property_values"
"include": "#variable"
},
{
"include": "#variable"
"include": "#property_values"
}
]
},
@ -1326,7 +1457,7 @@
]
},
"selector_attribute": {
"match": "(?xi)\n(\\[)\n\\s*\n(\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+?\n)\n(?:\n \\s*([~|^$*]?=)\\s*\n (?:\n (\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n )\n |\n ((\")(.*?)(\"))\n |\n ((')(.*?)('))\n )\n)?\n\\s*\n(\\])",
"match": "(?xi)\n(\\[)\n\\s*\n(\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+?\n)\n(?:\n \\s*([~|^$*]?=)\\s*\n (?:\n (\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n )\n |\n ((\")(.*?)(\"))\n |\n ((')(.*?)('))\n )\n)?\n\\s*\n(\\])",
"name": "meta.attribute-selector.scss",
"captures": {
"1": {
@ -1421,7 +1552,7 @@
}
},
"selector_class": {
"match": "(?x)\n(\\.) # Valid class-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n | ; # - A semicolon\n)",
"match": "(?x)\n(\\.) # Valid class-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n | ; # - A semicolon\n)",
"name": "entity.other.attribute-name.class.css",
"captures": {
"1": {
@ -1449,7 +1580,7 @@
"name": "entity.name.tag.custom.scss"
},
"selector_id": {
"match": "(?x)\n(\\#) # Valid id-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)",
"match": "(?x)\n(\\#) # Valid id-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n)",
"name": "entity.other.attribute-name.id.css",
"captures": {
"1": {
@ -1473,7 +1604,7 @@
}
},
"selector_placeholder": {
"match": "(?x)\n(%) # Valid placeholder-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= ; # - End of statement\n | $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)",
"match": "(?x)\n(%) # Valid placeholder-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.\\$ # Possible start of interpolation module scope variable\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= ; # - End of statement\n | $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n)",
"name": "entity.other.attribute-name.placeholder.css",
"captures": {
"1": {
@ -1723,8 +1854,26 @@
]
},
"variables": {
"match": "(\\$|\\-\\-)[A-Za-z0-9_-]+\\b",
"name": "variable.scss"
"patterns": [
{
"match": "\\b([\\w-]+)(\\.)(\\$[\\w-]+)\\b",
"captures": {
"1": {
"name": "variable.scss"
},
"2": {
"name": "punctuation.access.module.scss"
},
"3": {
"name": "variable.scss"
}
}
},
{
"match": "(\\$|\\-\\-)[A-Za-z0-9_-]+\\b",
"name": "variable.scss"
}
]
}
}
}

View file

@ -252,6 +252,9 @@
],
"colors": {
"editor.background": "#000c18",
"editor.foreground": "#6688cc",
// Base
// "foreground": "",
"focusBorder": "#596F99",
@ -295,8 +298,6 @@
"scrollbarSlider.hoverBackground": "#3B3F5188",
// Editor
"editor.background": "#000c18",
// "editor.foreground": "#6688cc",
"editorWidget.background": "#262641",
"editorCursor.foreground": "#ddbb88",
"editorWhitespace.foreground": "#103050",

View file

@ -30,7 +30,7 @@
"format.placeOpenBraceOnNewLineForFunctions": "Defines whether an open brace is put onto a new line for functions or not.",
"format.placeOpenBraceOnNewLineForControlBlocks": "Defines whether an open brace is put onto a new line for control blocks or not.",
"format.semicolons": "Defines handling of optional semicolons. Requires using TypeScript 3.7 or newer in the workspace.",
"format.semicolons.ignore": "Dont insert or remove any semicolons.",
"format.semicolons.ignore": "Don't insert or remove any semicolons.",
"format.semicolons.insert": "Insert semicolons at statement ends.",
"format.semicolons.remove": "Remove unnecessary semicolons.",
"javascript.validate.enable": "Enable/disable JavaScript validation.",
@ -43,8 +43,8 @@
"typescript.selectTypeScriptVersion.title": "Select TypeScript Version...",
"typescript.reportStyleChecksAsWarnings": "Report style checks as warnings.",
"javascript.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing jsconfig.json or tsconfig.json files override this setting. Requires using TypeScript 2.3.1 or newer in the workspace.",
"typescript.npm": "Specifies the path to the NPM executable used for Automatic Type Acquisition. Requires using TypeScript 2.3.4 or newer in the workspace.",
"typescript.check.npmIsInstalled": "Check if NPM is installed for Automatic Type Acquisition.",
"typescript.npm": "Specifies the path to the npm executable used for Automatic Type Acquisition. Requires using TypeScript 2.3.4 or newer in the workspace.",
"typescript.check.npmIsInstalled": "Check if npm is installed for Automatic Type Acquisition.",
"configuration.suggest.names": "Enable/disable including unique names from the file in JavaScript suggestions. Note that name suggestions are always disabled in JavaScript code that is semantically checked using `@ts-check` or `checkJs`.",
"typescript.tsc.autoDetect": "Controls auto detection of tsc tasks.",
"typescript.tsc.autoDetect.off": "Disable this feature.",

View file

@ -118,7 +118,11 @@ class BufferSynchronizer {
}
}
public beforeCommand(command: string) {
public reset(): void {
this._pending.clear();
}
public beforeCommand(command: string): void {
if (command === 'updateOpen') {
return;
}
@ -150,7 +154,7 @@ class BufferSynchronizer {
}
private get supportsBatching(): boolean {
return this.client.apiVersion.gte(API.v340) && vscode.workspace.getConfiguration('typescript', null).get<boolean>('useBatchedBufferSync', true);
return this.client.apiVersion.gte(API.v340);
}
private updatePending(resource: vscode.Uri, f: (pending: ResourceMap<CloseOperation | OpenOperation | ChangeOperation>) => void): void {
@ -265,16 +269,15 @@ class GetErrRequest {
files: ResourceMap<void>,
onDone: () => void
) {
const token = new vscode.CancellationTokenSource();
return new GetErrRequest(client, files, token, onDone);
return new GetErrRequest(client, files, onDone);
}
private _done: boolean = false;
private readonly _token: vscode.CancellationTokenSource = new vscode.CancellationTokenSource();
private constructor(
client: ITypeScriptServiceClient,
public readonly files: ResourceMap<void>,
private readonly _token: vscode.CancellationTokenSource,
onDone: () => void
) {
const args: Proto.GeterrRequestArgs = {
@ -282,7 +285,7 @@ class GetErrRequest {
files: coalesce(Array.from(files.entries).map(entry => client.normalizedPath(entry.resource)))
};
client.executeAsync('geterr', args, _token.token)
client.executeAsync('geterr', args, this._token.token)
.finally(() => {
if (this._done) {
return;
@ -394,7 +397,11 @@ export default class BufferSyncSupport extends Disposable {
return vscode.Uri.file(filePath);
}
public reOpenDocuments(): void {
public reset(): void {
this.pendingGetErr?.cancel();
this.pendingDiagnostics.clear();
this.synchronizer.reset();
for (const buffer of this.syncedBuffers.allBuffers) {
buffer.open();
}
@ -427,6 +434,7 @@ export default class BufferSyncSupport extends Disposable {
return;
}
this.pendingDiagnostics.delete(resource);
this.pendingGetErr?.files.delete(resource);
this.syncedBuffers.delete(resource);
syncedBuffer.close();
this._onDelete.fire(resource);
@ -522,8 +530,10 @@ export default class BufferSyncSupport extends Disposable {
if (this.pendingGetErr) {
this.pendingGetErr.cancel();
for (const file of this.pendingGetErr.files.entries) {
orderedFileSet.set(file.resource, undefined);
for (const { resource } of this.pendingGetErr.files.entries) {
if (this.syncedBuffers.get(resource)) {
orderedFileSet.set(resource, undefined);
}
}
}

View file

@ -182,7 +182,7 @@ export default class TypeScriptServiceClientHost extends Disposable {
private populateService(): void {
this.fileConfigurationManager.reset();
this.client.bufferSyncSupport.reOpenDocuments();
this.client.bufferSyncSupport.reset();
this.client.bufferSyncSupport.requestAllDiagnostics();
// See https://github.com/Microsoft/TypeScript/issues/5530

View file

@ -38,7 +38,10 @@ function getTagBodyText(tag: Proto.JSDocTagInfo): string | undefined {
function getTagDocumentation(tag: Proto.JSDocTagInfo): string | undefined {
switch (tag.name) {
case 'augments':
case 'extends':
case 'param':
case 'template':
const body = (tag.text || '').split(/^([\w\.]+)\s*-?\s*/);
if (body && body.length === 3) {
const param = body[1];

View file

@ -344,7 +344,7 @@ function enableProblems(context: vscode.ExtensionContext): void {
}
function updateDiagnostics(document: vscode.TextDocument, collection: vscode.DiagnosticCollection): void {
if (document && document.fileName === '/large.ts') {
if (document && document.fileName === '/sample-folder/large.ts') {
collection.set(document.uri, [{
code: '',
message: 'cannot assign twice to immutable variable `storeHouses`',
@ -366,9 +366,9 @@ function updateDiagnostics(document: vscode.TextDocument, collection: vscode.Dia
}
}
function enableSearch(_context: vscode.ExtensionContext, _memFs: MemFS): void {
// NOT YET SUPPORTED
//context.subscriptions.push(vscode.workspace.registerFileSearchProvider(SCHEME, memFs));
function enableSearch(context: vscode.ExtensionContext, memFs: MemFS): void {
context.subscriptions.push(vscode.workspace.registerFileSearchProvider(SCHEME, memFs));
context.subscriptions.push(vscode.workspace.registerTextSearchProvider(SCHEME, memFs));
}
function enableTasks(): void {
@ -546,7 +546,7 @@ export class Directory implements vscode.FileStat {
export type Entry = File | Directory;
export class MemFS implements vscode.FileSystemProvider, vscode.FileSearchProvider {
export class MemFS implements vscode.FileSystemProvider, vscode.FileSearchProvider, vscode.TextSearchProvider {
root = new Directory(vscode.Uri.parse('memfs:/'), '');
@ -796,16 +796,52 @@ export class MemFS implements vscode.FileSystemProvider, vscode.FileSearchProvid
// --- search provider
provideFileSearchResults(query: vscode.FileSearchQuery, _options: vscode.FileSearchOptions, _token: vscode.CancellationToken): vscode.ProviderResult<vscode.Uri[]> {
return this._findFiles(query.pattern);
}
private _findFiles(query: string | undefined): vscode.Uri[] {
const files = this._getFiles();
const result: vscode.Uri[] = [];
const pattern = new RegExp(this._convertSimple2RegExpPattern(query.pattern));
const pattern = query ? new RegExp(this._convertSimple2RegExpPattern(query)) : null;
for (const file of files) {
if (pattern.exec(file.name)) {
if (!pattern || pattern.exec(file.name)) {
result.push(file.uri);
}
}
return result;
}
private _textDecoder = new TextDecoder();
provideTextSearchResults(query: vscode.TextSearchQuery, options: vscode.TextSearchOptions, progress: vscode.Progress<vscode.TextSearchResult>, _token: vscode.CancellationToken) {
const result: vscode.TextSearchComplete = { limitHit: false };
const files = this._findFiles(options.includes[0]);
if (files) {
for (const file of files) {
const content = this._textDecoder.decode(this.readFile(file));
const lines = content.split('\n');
for (let i = 0; i < lines.length; i++) {
const line = lines[i];
const index = line.indexOf(query.pattern);
if (index !== -1) {
progress.report({
uri: file,
ranges: new vscode.Range(new vscode.Position(i, index), new vscode.Position(i, index + query.pattern.length)),
preview: {
text: line,
matches: new vscode.Range(new vscode.Position(0, index), new vscode.Position(0, index + query.pattern.length))
}
});
}
}
}
}
return result;
}
}

View file

@ -23,6 +23,8 @@ suite('workspace-fs', () => {
assert.equal(typeof stat.mtime, 'number');
assert.equal(typeof stat.ctime, 'number');
assert.ok(stat.mtime > 0);
assert.ok(stat.ctime > 0);
const entries = await vscode.workspace.fs.readDirectory(root);
assert.ok(entries.length > 0);

View file

@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.41.0",
"distro": "d9c8e16599fe4b979791417422d0575b417fbe61",
"distro": "be6ad88ea0214dfdb03b943bef28e7a5c9fc2e4b",
"author": {
"name": "Microsoft Corporation"
},
@ -36,7 +36,7 @@
"http-proxy-agent": "^2.1.0",
"https-proxy-agent": "^2.2.3",
"iconv-lite": "0.5.0",
"jschardet": "1.6.0",
"jschardet": "2.1.1",
"keytar": "^4.11.0",
"native-is-elevated": "0.4.1",
"native-keymap": "2.0.0",
@ -49,12 +49,12 @@
"v8-inspect-profiler": "^0.0.20",
"vscode-minimist": "^1.2.1",
"vscode-nsfw": "1.2.8",
"vscode-proxy-agent": "^0.5.1",
"vscode-proxy-agent": "^0.5.2",
"vscode-ripgrep": "^1.5.7",
"vscode-sqlite3": "4.0.9",
"vscode-textmate": "^4.3.0",
"xterm": "4.2.0",
"xterm-addon-search": "0.3.0",
"xterm": "4.3.0-beta17",
"xterm-addon-search": "0.4.0-beta4",
"xterm-addon-web-links": "0.2.1",
"yauzl": "^2.9.2",
"yazl": "^2.4.3"
@ -65,6 +65,7 @@
"@types/chokidar": "2.1.3",
"@types/cookie": "^0.3.3",
"@types/graceful-fs": "4.1.2",
"@types/http-proxy-agent": "^2.0.1",
"@types/iconv-lite": "0.0.1",
"@types/keytar": "^4.4.0",
"@types/mocha": "2.2.39",
@ -72,6 +73,7 @@
"@types/semver": "^5.5.0",
"@types/sinon": "^1.16.36",
"@types/webpack": "^4.4.10",
"@types/windows-foreground-love": "^0.3.0",
"@types/winreg": "^1.2.30",
"@types/yauzl": "^2.9.1",
"@types/yazl": "^2.4.2",

View file

@ -9,7 +9,7 @@
"http-proxy-agent": "^2.1.0",
"https-proxy-agent": "^2.2.3",
"iconv-lite": "0.5.0",
"jschardet": "1.6.0",
"jschardet": "2.1.1",
"native-watchdog": "1.2.0",
"node-pty": "^0.10.0-beta2",
"onigasm-umd": "^2.2.2",
@ -17,17 +17,17 @@
"spdlog": "^0.11.1",
"vscode-minimist": "^1.2.1",
"vscode-nsfw": "1.2.8",
"vscode-proxy-agent": "^0.5.1",
"vscode-proxy-agent": "^0.5.2",
"vscode-ripgrep": "^1.5.7",
"vscode-textmate": "^4.3.0",
"xterm": "4.2.0",
"xterm-addon-search": "0.3.0",
"xterm": "4.3.0-beta17",
"xterm-addon-search": "0.4.0-beta4",
"xterm-addon-web-links": "0.2.1",
"yauzl": "^2.9.2",
"yazl": "^2.4.3"
},
"optionalDependencies": {
"vscode-windows-ca-certs": "0.1.0",
"vscode-windows-ca-certs": "0.2.0",
"vscode-windows-registry": "1.0.2"
}
}

View file

@ -5,8 +5,8 @@
"onigasm-umd": "^2.2.2",
"semver-umd": "^5.5.3",
"vscode-textmate": "^4.3.0",
"xterm": "4.2.0",
"xterm-addon-search": "0.3.0",
"xterm": "4.3.0-beta17",
"xterm-addon-search": "0.4.0-beta4",
"xterm-addon-web-links": "0.2.1"
}
}

View file

@ -31,17 +31,17 @@ vscode-textmate@^4.3.0:
dependencies:
oniguruma "^7.2.0"
xterm-addon-search@0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.3.0.tgz#fc6843bebab1873eff0c89e31f7b74bb3c4d8947"
integrity sha512-ZvRmkNBSz2dT00w0qJ3Hd5cwYoOfkVZpHou7Xxy1kO34wQglU/8Ec4DNTvU27sS9BUzEg8kUcTTru0DxhJXrTA==
xterm-addon-search@0.4.0-beta4:
version "0.4.0-beta4"
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.4.0-beta4.tgz#7762ea342c6b4f5e824d83466bd93793c9d7d779"
integrity sha512-TIbEBVhydGIxcyu/CfKJbD+BKHisMGbkAfaWlCPaWis2Xmw8yE7CKrCPn+lhZYl1MdjDVEmb8lQI6WetbC2OZA==
xterm-addon-web-links@0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/xterm-addon-web-links/-/xterm-addon-web-links-0.2.1.tgz#6d1f2ce613e09870badf17615e7a1170a31542b2"
integrity sha512-2KnHtiq0IG7hfwv3jw2/jQeH1RBk2d5CH4zvgwQe00rLofSJqSfgnJ7gwowxxpGHrpbPr6Lv4AmH/joaNw2+HQ==
xterm@4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.2.0.tgz#b9980b2ae18c64ed31bcc95eace3bcecffebbbd9"
integrity sha512-oNfLqt+LmghLPOt5UcskP5Km1fXpTBHsTZ99nxJKY2N0MNFXBKIVXUcNNhHCa74JGZFMGhLT58A/UN3HcPXSfg==
xterm@4.3.0-beta17:
version "4.3.0-beta17"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.3.0-beta17.tgz#c038cc00cb5be33d2a5f083255c329d9ed186565"
integrity sha512-Lgz7vL12MBKJSgK/UXJF22Yw+uEXEE7YZDWfUD+/jbHAKN4geLQJ/Y/b3gxjLL020dnYZuayfKOr2KWdhKsmCA==

View file

@ -217,10 +217,10 @@ is-number@^7.0.0:
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
jschardet@1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.6.0.tgz#c7d1a71edcff2839db2f9ec30fc5d5ebd3c1a678"
integrity sha512-xYuhvQ7I9PDJIGBWev9xm0+SMSed3ZDBAmvVjbFR1ZRLAF+vlXcQu6cRI9uAlj81rzikElRVteehwV7DuX2ZmQ==
jschardet@2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-2.1.1.tgz#af6f8fd0b3b0f5d46a8fd9614a4fce490575c184"
integrity sha512-pA5qG9Zwm8CBpGlK/lo2GE9jPxwqRgMV7Lzc/1iaPccw6v4Rhj8Zg2BTyrdmHmxlJojnbLupLeRnaPLsq03x6Q==
jsonfile@^4.0.0:
version "4.0.0"
@ -384,10 +384,10 @@ vscode-nsfw@1.2.8:
lodash.isundefined "^3.0.1"
nan "^2.10.0"
vscode-proxy-agent@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/vscode-proxy-agent/-/vscode-proxy-agent-0.5.1.tgz#7fd15e157c02176a0dca9f87840ad0991a62ca57"
integrity sha512-Nnkc7gBk9iAbbZURYZm3p/wvDvRVwDvdzEvDqF1Jh40p6przwQU/JTlV1XLrmd4cCwh6TOAWD81Z3cq+K7Xdmw==
vscode-proxy-agent@^0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/vscode-proxy-agent/-/vscode-proxy-agent-0.5.2.tgz#0c90d24d353957b841d741da7b2701e3f0a044c4"
integrity sha512-1cCNPxrWIrmUwS+1XGaXxkh3G1y7z2fpXl1sT74OZvELaryQWYb3NMxMLJJ4Q/CpPLEyuhp/bAN7nzHxxFcQ5Q==
dependencies:
debug "^3.1.0"
http-proxy-agent "^2.1.0"
@ -406,10 +406,10 @@ vscode-textmate@^4.3.0:
dependencies:
oniguruma "^7.2.0"
vscode-windows-ca-certs@0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/vscode-windows-ca-certs/-/vscode-windows-ca-certs-0.1.0.tgz#d58eeb40b536130918cfde2b01e6dc7e5c1bd757"
integrity sha512-ZfZbfJIE09Q0dwGqmqTj7kuAq4g6lul9WPJvo0DkKjln8/FL+dY3wUKIKbYwWQp4x56SBTLBq3tJkD72xQ9Gqw==
vscode-windows-ca-certs@0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/vscode-windows-ca-certs/-/vscode-windows-ca-certs-0.2.0.tgz#086f0f4de57e2760a35ac6920831bff246237115"
integrity sha512-YBrJRT0zos+Yb1Qdn73GD8QZr7pa2IE96b5Y1hmmp6XeR8aYB7Iiq5gDAF/+/AxL+caSR9KPZQ6jiYWh5biD7w==
dependencies:
node-addon-api "1.6.2"
@ -418,20 +418,20 @@ vscode-windows-registry@1.0.2:
resolved "https://registry.yarnpkg.com/vscode-windows-registry/-/vscode-windows-registry-1.0.2.tgz#b863e704a6a69c50b3098a55fbddbe595b0c124a"
integrity sha512-/CLLvuOSM2Vme2z6aNyB+4Omd7hDxpf4Thrt8ImxnXeQtxzel2bClJpFQvQqK/s4oaXlkBKS7LqVLeZM+uSVIA==
xterm-addon-search@0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.3.0.tgz#fc6843bebab1873eff0c89e31f7b74bb3c4d8947"
integrity sha512-ZvRmkNBSz2dT00w0qJ3Hd5cwYoOfkVZpHou7Xxy1kO34wQglU/8Ec4DNTvU27sS9BUzEg8kUcTTru0DxhJXrTA==
xterm-addon-search@0.4.0-beta4:
version "0.4.0-beta4"
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.4.0-beta4.tgz#7762ea342c6b4f5e824d83466bd93793c9d7d779"
integrity sha512-TIbEBVhydGIxcyu/CfKJbD+BKHisMGbkAfaWlCPaWis2Xmw8yE7CKrCPn+lhZYl1MdjDVEmb8lQI6WetbC2OZA==
xterm-addon-web-links@0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/xterm-addon-web-links/-/xterm-addon-web-links-0.2.1.tgz#6d1f2ce613e09870badf17615e7a1170a31542b2"
integrity sha512-2KnHtiq0IG7hfwv3jw2/jQeH1RBk2d5CH4zvgwQe00rLofSJqSfgnJ7gwowxxpGHrpbPr6Lv4AmH/joaNw2+HQ==
xterm@4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.2.0.tgz#b9980b2ae18c64ed31bcc95eace3bcecffebbbd9"
integrity sha512-oNfLqt+LmghLPOt5UcskP5Km1fXpTBHsTZ99nxJKY2N0MNFXBKIVXUcNNhHCa74JGZFMGhLT58A/UN3HcPXSfg==
xterm@4.3.0-beta17:
version "4.3.0-beta17"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.3.0-beta17.tgz#c038cc00cb5be33d2a5f083255c329d9ed186565"
integrity sha512-Lgz7vL12MBKJSgK/UXJF22Yw+uEXEE7YZDWfUD+/jbHAKN4geLQJ/Y/b3gxjLL020dnYZuayfKOr2KWdhKsmCA==
yauzl@^2.9.2:
version "2.10.0"

7
src/bootstrap.js vendored
View file

@ -263,7 +263,12 @@ exports.configurePortable = function () {
}
if (isTempPortable) {
process.env[process.platform === 'win32' ? 'TEMP' : 'TMPDIR'] = portableTempPath;
if (process.platform === 'win32') {
process.env['TMP'] = portableTempPath;
process.env['TEMP'] = portableTempPath;
} else {
process.env['TMPDIR'] = portableTempPath;
}
}
return {

View file

@ -147,13 +147,9 @@ function configureCommandlineSwitchesSync(cliArgs) {
if (argvValue === true || argvValue === 'true') {
if (argvKey === 'disable-hardware-acceleration') {
app.disableHardwareAcceleration(); // needs to be called explicitly
} else if (argvKey === 'disable-color-correct-rendering') {
app.commandLine.appendSwitch('disable-color-correct-rendering'); // needs to be called exactly like this (https://github.com/microsoft/vscode/issues/84154)
} else {
app.commandLine.appendArgument(argvKey);
app.commandLine.appendSwitch(argvKey);
}
} else {
app.commandLine.appendSwitch(argvKey, argvValue);
}
});

View file

@ -10,6 +10,7 @@
"alwaysStrict": true,
"strictBindCallApply": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"paths": {

View file

@ -1,11 +0,0 @@
declare module 'jschardet' {
export interface IDetectedMap {
encoding: string,
confidence: number
}
export function detect(buffer: Buffer): IDetectedMap;
export const Constants: {
MINIMUM_THRESHOLD: number,
}
}

View file

@ -1,6 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'vscode-proxy-agent';

View file

@ -1,6 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'vscode-windows-ca-certs';

View file

@ -1,10 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'windows-foreground-love' {
export function allowSetForegroundWindow(pid?: number): boolean;
}

View file

@ -6,6 +6,12 @@
import * as browser from 'vs/base/browser/browser';
import * as platform from 'vs/base/common/platform';
export const enum KeyboardSupport {
Always,
FullScreen,
None
}
/**
* Browser feature we can support in current platform, browser and environment.
*/
@ -37,9 +43,17 @@ export const BrowserFeatures = {
return true;
})()
},
/*
* Full Keyboard Support in Full Screen Mode or Standablone
*/
fullKeyboard: !!(<any>navigator).keyboard || browser.isSafari,
keyboard: (() => {
if (platform.isNative || browser.isStandalone) {
return KeyboardSupport.Always;
}
if ((<any>navigator).keyboard || browser.isSafari) {
return KeyboardSupport.FullScreen;
}
return KeyboardSupport.None;
})(),
touch: 'ontouchstart' in window || navigator.maxTouchPoints > 0 || window.navigator.msMaxTouchPoints > 0
};

View file

@ -26,6 +26,7 @@ export class FastDomNode<T extends HTMLElement> {
private _position: string;
private _visibility: string;
private _layerHint: boolean;
private _contain: 'none' | 'strict' | 'content' | 'size' | 'layout' | 'style' | 'paint';
constructor(domNode: T) {
this.domNode = domNode;
@ -47,6 +48,7 @@ export class FastDomNode<T extends HTMLElement> {
this._position = '';
this._visibility = '';
this._layerHint = false;
this._contain = 'none';
}
public setMaxWidth(maxWidth: number): void {
@ -206,6 +208,14 @@ export class FastDomNode<T extends HTMLElement> {
(<any>this.domNode.style).willChange = this._layerHint ? 'transform' : 'auto';
}
public setContain(contain: 'none' | 'strict' | 'content' | 'size' | 'layout' | 'style' | 'paint'): void {
if (this._contain === contain) {
return;
}
this._contain = contain;
(<any>this.domNode.style).contain = this._contain;
}
public setAttribute(name: string, value: string): void {
this.domNode.setAttribute(name, value);
}

View file

@ -90,4 +90,5 @@
display: flex;
align-items: center;
justify-content: center;
margin-right: 10px;
}

View file

@ -5,7 +5,7 @@
@font-face {
font-family: "codicon";
src: url("./codicon.ttf?7197ad7e38e9644da47ec42494d56501") format("truetype");
src: url("./codicon.ttf?3443fb4013ab5a04c23a30f912dd6627") format("truetype");
}
.codicon[class*='codicon-'] {
@ -19,11 +19,6 @@
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
/* Hack to get web rendering to align to pixel grid */
transform: rotate(0);
-webkit-transform: rotate(0.1deg);
-moz-transform: rotate(0);
}

View file

@ -27,12 +27,12 @@
min-width: 500px;
max-width: 90%;
min-height: 75px;
padding: 5px;
padding: 10px;
}
/** Dialog: Title Actions Row */
.monaco-workbench .dialog-box .dialog-toolbar-row {
padding-right: 1px;
padding-bottom: 4px;
}
.monaco-workbench .dialog-box .action-label {
@ -59,17 +59,17 @@
.monaco-workbench .dialog-box .dialog-message-row {
display: flex;
flex-grow: 1;
padding: 10px 15px 20px;
align-items: center;
padding: 0 10px;
}
.monaco-workbench .dialog-box .dialog-message-row .dialog-icon {
flex: 0 0 40px;
height: 40px;
flex: 0 0 48px;
height: 48px;
align-self: baseline;
background-position: center;
background-repeat: no-repeat;
background-size: 40px;
background-size: 48px;
}
.vs .monaco-workbench .dialog-box .dialog-message-row .dialog-icon.icon-pending {
@ -121,7 +121,7 @@
flex-direction: column;
overflow: hidden;
text-overflow: ellipsis;
padding-left: 20px;
padding-left: 24px;
user-select: text;
-webkit-user-select: text;
-ms-user-select: text;
@ -136,7 +136,6 @@
flex: 1; /* let the message always grow */
white-space: normal;
word-wrap: break-word; /* never overflow long words, but break to next line */
padding-bottom: 10px;
}
/** Dialog: Details */
@ -144,6 +143,7 @@
line-height: 22px;
flex: 1; /* let the message always grow */
opacity: .9;
margin-top: 8px;
}
.monaco-workbench .dialog-box .dialog-message-row .dialog-message-container .dialog-message a:focus {
@ -175,6 +175,7 @@
.monaco-workbench .dialog-box > .dialog-buttons-row {
display: flex;
white-space: nowrap;
padding: 20px 10px 10px;
}
/** Dialog: Buttons */

View file

@ -1198,7 +1198,11 @@ export class List<T> implements ISpliceable<T>, IDisposable {
this.view = new ListView(container, virtualDelegate, renderers, viewOptions);
this.updateAriaRole();
if (typeof _options.ariaRole !== 'string') {
this.view.domNode.setAttribute('role', ListAriaRootRole.TREE);
} else {
this.view.domNode.setAttribute('role', _options.ariaRole);
}
this.styleElement = DOM.createStyleSheet(this.view.domNode);
@ -1610,19 +1614,9 @@ export class List<T> implements ISpliceable<T>, IDisposable {
this.view.domNode.removeAttribute('aria-activedescendant');
}
this.updateAriaRole();
DOM.toggleClass(this.view.domNode, 'element-focused', focus.length > 0);
}
private updateAriaRole(): void {
if (typeof this.options.ariaRole !== 'string') {
this.view.domNode.setAttribute('role', ListAriaRootRole.TREE);
} else {
this.view.domNode.setAttribute('role', this.options.ariaRole);
}
}
private _onSelectionChange(): void {
const selection = this.selection.get();

View file

@ -99,6 +99,7 @@ export abstract class AbstractScrollbar extends Widget {
this.slider.setHeight(height);
}
this.slider.setLayerHinting(true);
this.slider.setContain('strict');
this.domNode.domNode.appendChild(this.slider.domNode);

View file

@ -264,7 +264,7 @@ function dfs<TInput, T>(node: IAsyncDataTreeNode<TInput, T>, fn: (node: IAsyncDa
export class AsyncDataTree<TInput, T, TFilterData = void> implements IDisposable {
protected readonly tree: ObjectTree<IAsyncDataTreeNode<TInput, T>, TFilterData>;
private readonly root: IAsyncDataTreeNode<TInput, T>;
protected readonly root: IAsyncDataTreeNode<TInput, T>;
private readonly nodes = new Map<null | T, IAsyncDataTreeNode<TInput, T>>();
private readonly sorter?: ITreeSorter<T>;
private readonly collapseByDefault?: { (e: T): boolean; };
@ -859,7 +859,7 @@ export class AsyncDataTree<TInput, T, TFilterData = void> implements IDisposable
return childrenToRefresh;
}
private render(node: IAsyncDataTreeNode<TInput, T>, viewStateContext?: IAsyncDataTreeViewStateContext<TInput, T>): void {
protected render(node: IAsyncDataTreeNode<TInput, T>, viewStateContext?: IAsyncDataTreeViewStateContext<TInput, T>): void {
const children = node.children.map(node => this.asTreeElement(node, viewStateContext));
this.tree.setChildren(node === this.root ? null : node, children);
@ -1031,7 +1031,7 @@ export interface ICompressibleAsyncDataTreeOptionsUpdate extends IAsyncDataTreeO
export class CompressibleAsyncDataTree<TInput, T, TFilterData = void> extends AsyncDataTree<TInput, T, TFilterData> {
protected readonly tree: CompressibleObjectTree<IAsyncDataTreeNode<TInput, T>, TFilterData>;
protected readonly tree!: CompressibleObjectTree<IAsyncDataTreeNode<TInput, T>, TFilterData>;
protected readonly compressibleNodeMapper: CompressibleAsyncDataTreeNodeMapper<TInput, T, TFilterData> = new WeakMapper(node => new CompressibleAsyncDataTreeNodeWrapper(node));
constructor(
@ -1098,4 +1098,75 @@ export class CompressibleAsyncDataTree<TInput, T, TFilterData = void> extends As
return { focus, selection, expanded, scrollTop: this.scrollTop };
}
protected render(node: IAsyncDataTreeNode<TInput, T>, viewStateContext?: IAsyncDataTreeViewStateContext<TInput, T>): void {
if (!this.identityProvider) {
return super.render(node, viewStateContext);
}
// Preserve traits across compressions. Hacky but does the trick.
// This is hard to fix properly since it requires rewriting the traits
// across trees and lists. Let's just keep it this way for now.
const getId = (element: T) => this.identityProvider!.getId(element).toString();
const getUncompressedIds = (nodes: IAsyncDataTreeNode<TInput, T>[]): Set<string> => {
const result = new Set<string>();
for (const node of nodes) {
const compressedNode = this.tree.getCompressedTreeNode(node === this.root ? null : node);
if (!compressedNode.element) {
continue;
}
for (const node of compressedNode.element.elements) {
result.add(getId(node.element as T));
}
}
return result;
};
const oldSelection = getUncompressedIds(this.tree.getSelection() as IAsyncDataTreeNode<TInput, T>[]);
const oldFocus = getUncompressedIds(this.tree.getFocus() as IAsyncDataTreeNode<TInput, T>[]);
super.render(node, viewStateContext);
const selection = this.getSelection();
let didChangeSelection = false;
const focus = this.getFocus();
let didChangeFocus = false;
const visit = (node: ITreeNode<ICompressedTreeNode<IAsyncDataTreeNode<TInput, T>> | null, TFilterData>) => {
const compressedNode = node.element;
if (compressedNode) {
for (let i = 0; i < compressedNode.elements.length; i++) {
const id = getId(compressedNode.elements[i].element as T);
if (oldSelection.has(id)) {
selection.push(compressedNode.elements[compressedNode.elements.length - 1].element as T);
didChangeSelection = true;
}
if (oldFocus.has(id)) {
focus.push(compressedNode.elements[compressedNode.elements.length - 1].element as T);
didChangeFocus = true;
}
}
}
node.children.forEach(visit);
};
visit(this.tree.getCompressedTreeNode(node === this.root ? null : node));
if (didChangeSelection) {
this.setSelection(selection);
}
if (didChangeFocus) {
this.setFocus(focus);
}
}
}

View file

@ -199,27 +199,25 @@ export function detectEncodingByBOMFromBuffer(buffer: Buffer | VSBuffer | null,
return null;
}
const MINIMUM_THRESHOLD = 0.2;
const IGNORE_ENCODINGS = ['ascii', 'utf-8', 'utf-16', 'utf-32'];
/**
* Guesses the encoding from buffer.
*/
async function guessEncodingByBuffer(buffer: Buffer): Promise<string | null> {
const jschardet = await import('jschardet');
jschardet.Constants.MINIMUM_THRESHOLD = MINIMUM_THRESHOLD;
const guessed = jschardet.detect(buffer);
if (!guessed || !guessed.encoding) {
return null;
}
const enc = guessed.encoding.toLowerCase();
// Ignore encodings that cannot guess correctly
// (http://chardet.readthedocs.io/en/latest/supported-encodings.html)
if (0 <= IGNORE_ENCODINGS.indexOf(enc)) {
// Ignore 'ascii' as guessed encoding because that
// is almost never what we want, rather fallback
// to the configured encoding then. Otherwise,
// opening a ascii-only file with auto guessing
// enabled will put the file into 'ascii' mode
// and thus typing any special characters is
// not possible anymore.
if (guessed.encoding.toLowerCase() === 'ascii') {
return null;
}

View file

@ -134,6 +134,7 @@ export class QuickOpenWidget extends Disposable implements IModelProvider {
private styles: IQuickOpenStyles;
// @ts-ignore (legacy widget - to be replaced with quick input)
private renderer: Renderer;
private keyDownSeenSinceShown = false;
constructor(container: HTMLElement, callbacks: IQuickOpenCallbacks, options: IQuickOpenOptions) {
super();
@ -170,6 +171,7 @@ export class QuickOpenWidget extends Disposable implements IModelProvider {
this._register(DOM.addDisposableListener(this.element, DOM.EventType.FOCUS, e => this.gainingFocus(), true));
this._register(DOM.addDisposableListener(this.element, DOM.EventType.BLUR, e => this.loosingFocus(e), true));
this._register(DOM.addDisposableListener(this.element, DOM.EventType.KEY_DOWN, e => {
this.keyDownSeenSinceShown = true;
const keyboardEvent: StandardKeyboardEvent = new StandardKeyboardEvent(e);
if (keyboardEvent.keyCode === KeyCode.Escape) {
DOM.EventHelper.stop(e, true);
@ -220,6 +222,7 @@ export class QuickOpenWidget extends Disposable implements IModelProvider {
this._register(DOM.addDisposableListener(this.inputBox.inputElement, DOM.EventType.INPUT, (e: Event) => this.onType()));
this._register(DOM.addDisposableListener(this.inputBox.inputElement, DOM.EventType.KEY_DOWN, (e: KeyboardEvent) => {
this.keyDownSeenSinceShown = true;
const keyboardEvent: StandardKeyboardEvent = new StandardKeyboardEvent(e);
const shouldOpenInBackground = this.shouldOpenInBackground(keyboardEvent);
@ -300,6 +303,7 @@ export class QuickOpenWidget extends Disposable implements IModelProvider {
}));
this._register(DOM.addDisposableListener(this.treeContainer, DOM.EventType.KEY_DOWN, e => {
this.keyDownSeenSinceShown = true;
const keyboardEvent: StandardKeyboardEvent = new StandardKeyboardEvent(e);
// Only handle when in quick navigation mode
@ -320,7 +324,7 @@ export class QuickOpenWidget extends Disposable implements IModelProvider {
const keyCode = keyboardEvent.keyCode;
// Only handle when in quick navigation mode
if (!this.quickNavigateConfiguration) {
if (!this.quickNavigateConfiguration || !this.keyDownSeenSinceShown) {
return;
}
@ -595,6 +599,7 @@ export class QuickOpenWidget extends Disposable implements IModelProvider {
this.visible = true;
this.isLoosingFocus = false;
this.quickNavigateConfiguration = options ? options.quickNavigateConfiguration : undefined;
this.keyDownSeenSinceShown = false;
// Adjust UI for quick navigate mode
if (this.quickNavigateConfiguration) {

View file

@ -189,6 +189,20 @@ suite('Encoding', () => {
assert.equal(mimes.seemsBinary, false);
});
test('autoGuessEncoding (UTF8)', async function () {
const file = getPathFromAmdModule(require, './fixtures/some_file.css');
const buffer = await readExactlyByFile(file, 512 * 8);
const mimes = await encoding.detectEncodingFromBuffer(buffer, true);
assert.equal(mimes.encoding, 'utf8');
});
test('autoGuessEncoding (ASCII)', async function () {
const file = getPathFromAmdModule(require, './fixtures/some_ansi.css');
const buffer = await readExactlyByFile(file, 512 * 8);
const mimes = await encoding.detectEncodingFromBuffer(buffer, true);
assert.equal(mimes.encoding, null);
});
test('autoGuessEncoding (ShiftJIS)', async function () {
const file = getPathFromAmdModule(require, './fixtures/some.shiftjis.txt');
const buffer = await readExactlyByFile(file, 512 * 8);

View file

@ -0,0 +1,42 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------
The base color for this template is #5c87b2. If you'd like
to use a different color start by replacing all instances of
#5c87b2 with your new color.
öäüßßß
----------------------------------------------------------*/
body
{
background-color: #5c87b2;
font-size: .75em;
font-family: Segoe UI, Verdana, Helvetica, Sans-Serif;
margin: 8px;
padding: 0;
color: #696969;
}
h1, h2, h3, h4, h5, h6
{
color: #000;
font-size: 40px;
margin: 0px;
}
textarea
{
font-family: Consolas
}
#results
{
margin-top: 2em;
margin-left: 2em;
color: black;
font-size: medium;
}

View file

@ -7,6 +7,8 @@
The base color for this template is #5c87b2. If you'd like
to use a different color start by replacing all instances of
#5c87b2 with your new color.
öäüßßß
----------------------------------------------------------*/
body
{
@ -25,12 +27,12 @@ h1, h2, h3, h4, h5, h6
margin: 0px;
}
textarea
textarea
{
font-family: Consolas
}
#results
#results
{
margin-top: 2em;
margin-left: 2em;

View file

@ -11,7 +11,6 @@ import { Disposable } from 'vs/base/common/lifecycle';
import { request } from 'vs/base/parts/request/browser/request';
import { isFolderToOpen, isWorkspaceToOpen } from 'vs/platform/windows/common/windows';
import { isEqual } from 'vs/base/common/resources';
import { isStandalone } from 'vs/base/browser/browser';
interface ICredential {
service: string;
@ -223,7 +222,7 @@ class WorkspaceProvider implements IWorkspaceProvider {
if (options?.reuse) {
window.location.href = targetHref;
} else {
if (isStandalone) {
if (this.isRunningInPWA()) { // TODO@ben figure out why browser.isStandalone would not work?
window.open(targetHref, '_blank', 'toolbar=no'); // ensures to open another 'standalone' window!
} else {
window.open(targetHref);
@ -232,6 +231,10 @@ class WorkspaceProvider implements IWorkspaceProvider {
}
}
private isRunningInPWA(): boolean {
return (window.matchMedia && window.matchMedia('(display-mode: standalone)').matches);
}
private createTargetUrl(workspace: IWorkspace, options?: { reuse?: boolean, payload?: object }): string | undefined {
// Empty

View file

@ -59,7 +59,7 @@ import { IElectronService } from 'vs/platform/electron/node/electron';
import { LoggerService } from 'vs/platform/log/node/loggerService';
import { UserDataSyncLogService } from 'vs/platform/userDataSync/common/userDataSyncLog';
import { IAuthTokenService } from 'vs/platform/auth/common/auth';
import { AuthTokenService } from 'vs/platform/auth/common/authTokenService';
import { AuthTokenService } from 'vs/platform/auth/electron-browser/authTokenService';
import { AuthTokenChannel } from 'vs/platform/auth/common/authTokenIpc';
import { ICredentialsService } from 'vs/platform/credentials/common/credentials';
import { KeytarCredentialsService } from 'vs/platform/credentials/node/credentialsService';

View file

@ -60,7 +60,7 @@ const enum WindowError {
export class CodeWindow extends Disposable implements ICodeWindow {
private static readonly MIN_WIDTH = 600;
private static readonly MIN_HEIGHT = 600;
private static readonly MIN_HEIGHT = 270;
private static readonly MAX_URL_LENGTH = 2 * 1024 * 1024; // https://cs.chromium.org/chromium/src/url/url_constants.cc?l=32

View file

@ -28,7 +28,9 @@ suite('Windows Native Helpers', () => {
});
test('vscode-windows-ca-certs', async () => {
const windowsCerts = await import('vscode-windows-ca-certs');
const windowsCerts = await new Promise<any>((resolve, reject) => {
require(['vscode-windows-ca-certs'], resolve, reject);
});
assert.ok(windowsCerts, 'Unable to load vscode-windows-ca-certs dependency.');
});

View file

@ -406,6 +406,10 @@ export class TextAreaHandler extends ViewPart {
this._textAreaInput.focusTextArea();
}
public refreshFocusState() {
this._textAreaInput.refreshFocusState();
}
// --- end view API
private _primaryCursorVisibleRange: HorizontalPosition | null = null;

View file

@ -163,7 +163,7 @@ export class TextAreaInput extends Disposable {
private _isDoingComposition: boolean;
private _nextCommand: ReadFromTextArea;
constructor(host: ITextAreaInputHost, textArea: FastDomNode<HTMLTextAreaElement>) {
constructor(host: ITextAreaInputHost, private textArea: FastDomNode<HTMLTextAreaElement>) {
super();
this._host = host;
this._textArea = this._register(new TextAreaWrapper(textArea));
@ -483,6 +483,14 @@ export class TextAreaInput extends Disposable {
return this._hasFocus;
}
public refreshFocusState(): void {
if (document.body.contains(this.textArea.domNode) && document.activeElement === this.textArea.domNode) {
this._setHasFocus(true);
} else {
this._setHasFocus(false);
}
}
private _setHasFocus(newHasFocus: boolean): void {
if (this._hasFocus === newHasFocus) {
// no change

View file

@ -13,7 +13,7 @@ import { equalsIgnoreCase } from 'vs/base/common/strings';
import { URI } from 'vs/base/common/uri';
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands';
import { IOpener, IOpenerService, IValidator, IExternalUriResolver, OpenOptions } from 'vs/platform/opener/common/opener';
import { IOpener, IOpenerService, IValidator, IExternalUriResolver, OpenOptions, ResolveExternalUriOptions, IResolvedExternalUri, IExternalOpener } from 'vs/platform/opener/common/opener';
import { EditorOpenContext } from 'vs/platform/editor/common/editor';
export class OpenerService extends Disposable implements IOpenerService {
@ -23,12 +23,22 @@ export class OpenerService extends Disposable implements IOpenerService {
private readonly _openers = new LinkedList<IOpener>();
private readonly _validators = new LinkedList<IValidator>();
private readonly _resolvers = new LinkedList<IExternalUriResolver>();
private _externalOpener: IExternalOpener;
constructor(
@ICodeEditorService private readonly _editorService: ICodeEditorService,
@ICommandService private readonly _commandService: ICommandService,
) {
super();
// Default external opener is going through window.open()
this._externalOpener = {
openExternal: href => {
dom.windowOpenNoOpener(href);
return Promise.resolve(true);
}
};
}
registerOpener(opener: IOpener): IDisposable {
@ -49,6 +59,10 @@ export class OpenerService extends Disposable implements IOpenerService {
return { dispose: remove };
}
setExternalOpener(externalOpener: IExternalOpener): void {
this._externalOpener = externalOpener;
}
async open(resource: URI, options?: OpenOptions): Promise<boolean> {
// no scheme ?!?
@ -75,7 +89,7 @@ export class OpenerService extends Disposable implements IOpenerService {
return this._doOpen(resource, options);
}
async resolveExternalUri(resource: URI, options?: { readonly allowTunneling?: boolean }): Promise<{ resolved: URI, dispose(): void }> {
async resolveExternalUri(resource: URI, options?: ResolveExternalUriOptions): Promise<IResolvedExternalUri> {
for (const resolver of this._resolvers.toArray()) {
const result = await resolver.resolveExternalUri(resource, options);
if (result) {
@ -89,13 +103,8 @@ export class OpenerService extends Disposable implements IOpenerService {
private async _doOpen(resource: URI, options: OpenOptions | undefined): Promise<boolean> {
const { scheme, path, query, fragment } = resource;
if (equalsIgnoreCase(scheme, Schemas.mailto) || options?.openExternal) {
// open default mail application
return this._doOpenExternal(resource, options);
}
if (equalsIgnoreCase(scheme, Schemas.http) || equalsIgnoreCase(scheme, Schemas.https)) {
// open link in default browser
if (options?.openExternal || equalsIgnoreCase(scheme, Schemas.mailto) || equalsIgnoreCase(scheme, Schemas.http) || equalsIgnoreCase(scheme, Schemas.https)) {
// open externally
return this._doOpenExternal(resource, options);
}
@ -149,9 +158,10 @@ export class OpenerService extends Disposable implements IOpenerService {
private async _doOpenExternal(resource: URI, options: OpenOptions | undefined): Promise<boolean> {
const { resolved } = await this.resolveExternalUri(resource, options);
dom.windowOpenNoOpener(encodeURI(resolved.toString(true)));
return true;
// TODO@Jo neither encodeURI nor toString(true) should be needed
// once we go with URL and not URI
return this._externalOpener.openExternal(encodeURI(resolved.toString(true)));
}
dispose() {

View file

@ -528,6 +528,10 @@ export class View extends ViewEventHandler {
return this._textAreaHandler.isFocused();
}
public refreshFocusState() {
this._textAreaHandler.refreshFocusState();
}
public addContentWidget(widgetData: IContentWidgetData): void {
this.contentWidgets.addWidget(widgetData.widget);
this.layoutContentWidget(widgetData);

View file

@ -544,6 +544,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost<ViewLine>,
// (3) handle scrolling
this._linesContent.setLayerHinting(this._canUseLayerHinting);
this._linesContent.setContain('strict');
const adjustedScrollTop = this._context.viewLayout.getCurrentScrollTop() - viewportData.bigNumbersDelta;
this._linesContent.setTop(-adjustedScrollTop);
this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft());

View file

@ -78,6 +78,7 @@ export class Margin extends ViewPart {
public render(ctx: RestrictedRenderingContext): void {
this._domNode.setLayerHinting(this._canUseLayerHinting);
this._domNode.setContain('strict');
const adjustedScrollTop = ctx.scrollTop - ctx.bigNumbersDelta;
this._domNode.setTop(-adjustedScrollTop);

View file

@ -503,6 +503,7 @@ export class Minimap extends ViewPart {
this._slider.setPosition('absolute');
this._slider.setClassName('minimap-slider');
this._slider.setLayerHinting(true);
this._slider.setContain('strict');
this._domNode.appendChild(this._slider);
this._sliderHorizontal = createFastDomNode(document.createElement('div'));

View file

@ -215,6 +215,7 @@ export class DecorationsOverviewRuler extends ViewPart {
this._domNode.setClassName('decorationsOverviewRuler');
this._domNode.setPosition('absolute');
this._domNode.setLayerHinting(true);
this._domNode.setContain('strict');
this._domNode.setAttribute('aria-hidden', 'true');
this._updateSettings(false);

View file

@ -26,6 +26,7 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler {
this._domNode.setClassName(cssClassName);
this._domNode.setPosition('absolute');
this._domNode.setLayerHinting(true);
this._domNode.setContain('strict');
this._zoneManager = new OverviewZoneManager((lineNumber: number) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber));
this._zoneManager.setDOMWidth(0);

View file

@ -869,9 +869,11 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE
}
public onVisible(): void {
this._modelData?.view.refreshFocusState();
}
public onHide(): void {
this._modelData?.view.refreshFocusState();
}
public getContribution<T extends editorCommon.IEditorContribution>(id: string): T {

View file

@ -413,14 +413,18 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed
}
const configurationRegistry = Registry.as<IConfigurationRegistry>(Extensions.Configuration);
const editorConfiguration: IConfigurationNode = {
export const editorConfigurationBaseNode = Object.freeze<IConfigurationNode>({
id: 'editor',
order: 5,
type: 'object',
title: nls.localize('editorConfigurationTitle', "Editor"),
overridable: true,
scope: ConfigurationScope.RESOURCE,
});
const configurationRegistry = Registry.as<IConfigurationRegistry>(Extensions.Configuration);
const editorConfiguration: IConfigurationNode = {
...editorConfigurationBaseNode,
properties: {
'editor.tabSize': {
type: 'number',

View file

@ -3155,10 +3155,10 @@ export const EditorOptions = {
['default', 'all'] as const,
{
enumDescriptions: [
nls.localize('cursorSurroundingLinesStyle.default', "`cursorSurroundingLines` is enforced only when triggered from keyboard and api"),
nls.localize('cursorSurroundingLinesStyle.default', "`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),
nls.localize('cursorSurroundingLinesStyle.all', "`cursorSurroundingLines` is enforced always.")
],
description: nls.localize('cursorSurroundingLinesStyle', "Controls when `cursorSurroundingLines` should be enforced")
description: nls.localize('cursorSurroundingLinesStyle', "Controls when `cursorSurroundingLines` should be enforced.")
}
)),
cursorWidth: register(new EditorIntOption(

View file

@ -30,7 +30,7 @@ export class CodeActionUi extends Disposable {
quickFixActionId: string,
preferredFixActionId: string,
private readonly delegate: {
applyCodeAction: (action: CodeAction, regtriggerAfterApply: boolean) => void
applyCodeAction: (action: CodeAction, regtriggerAfterApply: boolean) => Promise<void>
},
@IContextMenuService contextMenuService: IContextMenuService,
@IKeybindingService keybindingService: IKeybindingService,
@ -81,7 +81,7 @@ export class CodeActionUi extends Disposable {
// Apply if we only have one action or requested autoApply
if (newState.trigger.autoApply === CodeActionAutoApply.First || (newState.trigger.autoApply === CodeActionAutoApply.IfSingle && actions.actions.length === 1)) {
try {
this.delegate.applyCodeAction(actions.actions[0], false);
await this.delegate.applyCodeAction(actions.actions[0], false);
} finally {
actions.dispose();
}

View file

@ -326,7 +326,7 @@ export class CodeLensContribution implements editorCommon.IEditorContribution {
return;
}
this._currentResolveCodeLensSymbolsPromise = createCancelablePromise(token => {
const resolvePromise = createCancelablePromise(token => {
const promises = toResolve.map((request, i) => {
@ -351,16 +351,21 @@ export class CodeLensContribution implements editorCommon.IEditorContribution {
return Promise.all(promises);
});
this._currentResolveCodeLensSymbolsPromise = resolvePromise;
this._currentResolveCodeLensSymbolsPromise.then(() => {
if (this._currentCodeLensModel) { // update the cached state with new resolved items
this._codeLensCache.put(model, this._currentCodeLensModel);
}
this._oldCodeLensModels.clear(); // dispose old models once we have updated the UI with the current model
this._currentResolveCodeLensSymbolsPromise = undefined;
if (resolvePromise === this._currentResolveCodeLensSymbolsPromise) {
this._currentResolveCodeLensSymbolsPromise = undefined;
}
}, err => {
onUnexpectedError(err); // can also be cancellation!
this._currentResolveCodeLensSymbolsPromise = undefined;
if (resolvePromise === this._currentResolveCodeLensSymbolsPromise) {
this._currentResolveCodeLensSymbolsPromise = undefined;
}
});
}
}

View file

@ -107,8 +107,6 @@ abstract class SymbolNavigationAction extends EditorAction {
protected abstract _getNoResultFoundMessage(info: IWordAtPosition | null): string;
protected abstract _getMetaTitle(model: ReferencesModel): string;
protected abstract _getAlternativeCommand(): string;
protected abstract _getGoToPreference(editor: IActiveCodeEditor): GoToLocationValues;
@ -171,7 +169,7 @@ abstract class SymbolNavigationAction extends EditorAction {
export class DefinitionAction extends SymbolNavigationAction {
protected async _getLocationModel(model: ITextModel, position: corePosition.Position, token: CancellationToken): Promise<ReferencesModel> {
return new ReferencesModel(await getDefinitionsAtPosition(model, position, token));
return new ReferencesModel(await getDefinitionsAtPosition(model, position, token), nls.localize('def.title', 'Definitions'));
}
protected _getNoResultFoundMessage(info: IWordAtPosition | null): string {
@ -180,10 +178,6 @@ export class DefinitionAction extends SymbolNavigationAction {
: nls.localize('generic.noResults', "No definition found");
}
protected _getMetaTitle(model: ReferencesModel): string {
return model.references.length > 1 ? nls.localize('meta.title', " {0} definitions", model.references.length) : '';
}
protected _getAlternativeCommand(): string {
return 'editor.action.goToReferences';
}
@ -295,7 +289,7 @@ registerEditorAction(class PeekDefinitionAction extends DefinitionAction {
class DeclarationAction extends SymbolNavigationAction {
protected async _getLocationModel(model: ITextModel, position: corePosition.Position, token: CancellationToken): Promise<ReferencesModel> {
return new ReferencesModel(await getDeclarationsAtPosition(model, position, token));
return new ReferencesModel(await getDeclarationsAtPosition(model, position, token), nls.localize('decl.title', 'Declarations'));
}
protected _getNoResultFoundMessage(info: IWordAtPosition | null): string {
@ -304,10 +298,6 @@ class DeclarationAction extends SymbolNavigationAction {
: nls.localize('decl.generic.noResults', "No declaration found");
}
protected _getMetaTitle(model: ReferencesModel): string {
return model.references.length > 1 ? nls.localize('decl.meta.title', " {0} declarations", model.references.length) : '';
}
protected _getAlternativeCommand(): string {
return 'editor.action.goToReferences';
}
@ -352,10 +342,6 @@ registerEditorAction(class GoToDeclarationAction extends DeclarationAction {
? nls.localize('decl.noResultWord', "No declaration found for '{0}'", info.word)
: nls.localize('decl.generic.noResults', "No declaration found");
}
protected _getMetaTitle(model: ReferencesModel): string {
return model.references.length > 1 ? nls.localize('decl.meta.title', " {0} declarations", model.references.length) : '';
}
});
registerEditorAction(class PeekDeclarationAction extends DeclarationAction {
@ -384,7 +370,7 @@ registerEditorAction(class PeekDeclarationAction extends DeclarationAction {
class TypeDefinitionAction extends SymbolNavigationAction {
protected async _getLocationModel(model: ITextModel, position: corePosition.Position, token: CancellationToken): Promise<ReferencesModel> {
return new ReferencesModel(await getTypeDefinitionsAtPosition(model, position, token));
return new ReferencesModel(await getTypeDefinitionsAtPosition(model, position, token), nls.localize('typedef.title', 'Type Definitions'));
}
protected _getNoResultFoundMessage(info: IWordAtPosition | null): string {
@ -393,10 +379,6 @@ class TypeDefinitionAction extends SymbolNavigationAction {
: nls.localize('goToTypeDefinition.generic.noResults', "No type definition found");
}
protected _getMetaTitle(model: ReferencesModel): string {
return model.references.length > 1 ? nls.localize('meta.typeDefinitions.title', " {0} type definitions", model.references.length) : '';
}
protected _getAlternativeCommand(): string {
return 'editor.action.goToReferences';
}
@ -470,7 +452,7 @@ registerEditorAction(class PeekTypeDefinitionAction extends TypeDefinitionAction
class ImplementationAction extends SymbolNavigationAction {
protected async _getLocationModel(model: ITextModel, position: corePosition.Position, token: CancellationToken): Promise<ReferencesModel> {
return new ReferencesModel(await getImplementationsAtPosition(model, position, token));
return new ReferencesModel(await getImplementationsAtPosition(model, position, token), nls.localize('impl.title', 'Implementations'));
}
protected _getNoResultFoundMessage(info: IWordAtPosition | null): string {
@ -479,10 +461,6 @@ class ImplementationAction extends SymbolNavigationAction {
: nls.localize('goToImplementation.generic.noResults', "No implementation found");
}
protected _getMetaTitle(model: ReferencesModel): string {
return model.references.length > 1 ? nls.localize('meta.implementations.title', " {0} implementations", model.references.length) : '';
}
protected _getAlternativeCommand(): string {
return '';
}
@ -561,7 +539,7 @@ registerEditorAction(class PeekImplementationAction extends ImplementationAction
class ReferencesAction extends SymbolNavigationAction {
protected async _getLocationModel(model: ITextModel, position: corePosition.Position, token: CancellationToken): Promise<ReferencesModel> {
return new ReferencesModel(await getReferencesAtPosition(model, position, token));
return new ReferencesModel(await getReferencesAtPosition(model, position, token), nls.localize('ref.title', 'References'));
}
protected _getNoResultFoundMessage(info: IWordAtPosition | null): string {
@ -570,12 +548,6 @@ class ReferencesAction extends SymbolNavigationAction {
: nls.localize('references.noGeneric', "No references found");
}
protected _getMetaTitle(model: ReferencesModel): string {
return model.references.length > 1
? nls.localize('meta.titleReference', " {0} references", model.references.length)
: '';
}
protected _getAlternativeCommand(): string {
return '';
}
@ -667,7 +639,7 @@ class GenericGoToLocationAction extends SymbolNavigationAction {
}
protected async _getLocationModel(_model: ITextModel, _position: corePosition.Position, _token: CancellationToken): Promise<ReferencesModel | undefined> {
return new ReferencesModel(this._references);
return new ReferencesModel(this._references, nls.localize('generic.title', 'Locations'));
}
protected _getNoResultFoundMessage(info: IWordAtPosition | null): string {
@ -678,7 +650,6 @@ class GenericGoToLocationAction extends SymbolNavigationAction {
return this._gotoMultipleBehaviour ?? editor.getOption(EditorOption.gotoLocation).multipleReferences;
}
protected _getMetaTitle() { return ''; }
protected _getAlternativeCommand() { return ''; }
}
@ -736,7 +707,7 @@ CommandsRegistry.registerCommand({
return undefined;
}
const references = createCancelablePromise(token => getReferencesAtPosition(control.getModel(), corePosition.Position.lift(position), token).then(references => new ReferencesModel(references)));
const references = createCancelablePromise(token => getReferencesAtPosition(control.getModel(), corePosition.Position.lift(position), token).then(references => new ReferencesModel(references, nls.localize('ref.title', 'References'))));
const range = new Range(position.lineNumber, position.column, position.lineNumber, position.column);
return Promise.resolve(controller.toggleWidget(range, references, false));
});

View file

@ -14,14 +14,14 @@ import { IStorageService, StorageScope } from 'vs/platform/storage/common/storag
import * as editorCommon from 'vs/editor/common/editorCommon';
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
import { ReferencesModel, OneReference } from '../referencesModel';
import { ReferenceWidget, LayoutData, ctxReferenceWidgetSearchTreeFocused } from './referencesWidget';
import { ReferenceWidget, LayoutData } from './referencesWidget';
import { Range } from 'vs/editor/common/core/range';
import { Position } from 'vs/editor/common/core/position';
import { Location } from 'vs/editor/common/modes';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { CancelablePromise, createCancelablePromise } from 'vs/base/common/async';
import { getOuterEditor, PeekContext } from 'vs/editor/contrib/peekView/peekView';
import { IListService } from 'vs/platform/list/browser/listService';
import { IListService, WorkbenchListFocusContextKey } from 'vs/platform/list/browser/listService';
import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
@ -151,10 +151,8 @@ export abstract class ReferencesController implements editorCommon.IEditorContri
if (this._widget && this._model && this._editor.hasModel()) { // might have been closed
// set title
if (this._model.references.length === 1) {
this._widget.setMetaTitle(nls.localize('metaTitle.1', "1 result"));
} else if (!this._model.isEmpty) {
this._widget.setMetaTitle(nls.localize('metaTitle.N', "{0} results", this._model.references.length));
if (!this._model.isEmpty) {
this._widget.setMetaTitle(nls.localize('metaTitle.N', "{0} ({1})", this._model.title, this._model.references.length));
} else {
this._widget.setMetaTitle('');
}
@ -361,12 +359,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
mac: {
primary: KeyMod.WinCtrl | KeyCode.Enter
},
when: ContextKeyExpr.and(ctxReferenceSearchVisible, ctxReferenceWidgetSearchTreeFocused),
when: ContextKeyExpr.and(ctxReferenceSearchVisible, WorkbenchListFocusContextKey),
handler(accessor: ServicesAccessor) {
const listService = accessor.get(IListService);
const focus = listService.lastFocusedList && listService.lastFocusedList.getFocus();
if (focus instanceof OneReference) {
withController(accessor, controller => controller.openReference(focus, true));
const focus = <any[]>listService.lastFocusedList?.getFocus();
if (Array.isArray(focus) && focus[0] instanceof OneReference) {
withController(accessor, controller => controller.openReference(focus[0], true));
}
}
});

View file

@ -101,7 +101,7 @@ export class StringRepresentationProvider implements IKeyboardNavigationLabelPro
export class IdentityProvider implements IIdentityProvider<TreeElement> {
getId(element: TreeElement): { toString(): string; } {
return element.uri;
return element instanceof OneReference ? element.id : element.uri;
}
}

View file

@ -23,7 +23,6 @@ import { Location } from 'vs/editor/common/modes';
import { ITextEditorModel, ITextModelService } from 'vs/editor/common/services/resolverService';
import { AriaProvider, DataSource, Delegate, FileReferencesRenderer, OneReferenceRenderer, TreeElement, StringRepresentationProvider, IdentityProvider } from 'vs/editor/contrib/gotoSymbol/peek/referencesTree';
import * as nls from 'vs/nls';
import { RawContextKey } from 'vs/platform/contextkey/common/contextkey';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ILabelService } from 'vs/platform/label/common/label';
import { WorkbenchAsyncDataTree } from 'vs/platform/list/browser/listService';
@ -182,8 +181,6 @@ export interface SelectionEvent {
readonly element?: Location;
}
export const ctxReferenceWidgetSearchTreeFocused = new RawContextKey<boolean>('referenceSearchTreeFocused', true);
/**
* ZoneWidget that is shown inside the editor
*/
@ -319,7 +316,6 @@ export class ReferenceWidget extends peekView.PeekViewWidget {
this._instantiationService.createInstance(DataSource),
treeOptions
);
ctxReferenceWidgetSearchTreeFocused.bindTo(this._tree.contextKeyService);
// split stuff
this._splitView.addView({

View file

@ -149,6 +149,7 @@ export class ReferencesModel implements IDisposable {
private readonly _disposables = new DisposableStore();
private readonly _links: LocationLink[];
private readonly _title: string;
readonly groups: FileReferences[] = [];
readonly references: OneReference[] = [];
@ -156,8 +157,9 @@ export class ReferencesModel implements IDisposable {
readonly _onDidChangeReferenceRange = new Emitter<OneReference>();
readonly onDidChangeReferenceRange: Event<OneReference> = this._onDidChangeReferenceRange.event;
constructor(links: LocationLink[]) {
constructor(links: LocationLink[], title: string) {
this._links = links;
this._title = title;
// grouping and sorting
const [providersFirst] = links;
@ -192,7 +194,11 @@ export class ReferencesModel implements IDisposable {
}
clone(): ReferencesModel {
return new ReferencesModel(this._links);
return new ReferencesModel(this._links, this._title);
}
get title(): string {
return this._title;
}
get isEmpty(): boolean {

View file

@ -21,7 +21,7 @@ suite('references', function () {
}, {
uri: URI.file('/src/can'),
range: new Range(1, 1, 1, 1)
}]);
}], 'FOO');
let ref = model.nearestReference(URI.file('/src/can'), new Position(1, 1));
assert.equal(ref!.uri.path, '/src/can');

View file

@ -14,6 +14,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment'
import { Registry } from 'vs/platform/registry/common/platform';
import { ColorIdentifier, Extensions, IColorRegistry } from 'vs/platform/theme/common/colorRegistry';
import { Extensions as ThemingExtensions, ICssStyleCollector, IIconTheme, IThemingRegistry } from 'vs/platform/theme/common/themeService';
import { TokenStyle, TokenClassification, ProbeScope } from 'vs/platform/theme/common/tokenClassificationRegistry';
const VS_THEME_NAME = 'vs';
const VS_DARK_THEME_NAME = 'vs-dark';
@ -23,6 +24,7 @@ const colorRegistry = Registry.as<IColorRegistry>(Extensions.ColorContribution);
const themingRegistry = Registry.as<IThemingRegistry>(ThemingExtensions.ThemingContribution);
class StandaloneTheme implements IStandaloneTheme {
public readonly id: string;
public readonly themeName: string;
@ -128,6 +130,14 @@ class StandaloneTheme implements IStandaloneTheme {
}
return this._tokenTheme;
}
getTokenStyle(classification: TokenClassification, useDefault?: boolean | undefined): TokenStyle | undefined {
return undefined;
}
resolveScopes(scopes: ProbeScope[]): TokenStyle | undefined {
return undefined;
}
}
function isBuiltinTheme(themeName: string): themeName is BuiltinTheme {

View file

@ -54,7 +54,11 @@ suite('TokenizationSupport2Adapter', () => {
defines: (color: ColorIdentifier): boolean => {
throw new Error('Not implemented');
}
},
getTokenStyle: () => undefined,
resolveScopes: () => undefined
};
}
public getIconTheme(): IIconTheme {

View file

@ -4,7 +4,8 @@
*--------------------------------------------------------------------------------------------*/
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { Event } from 'vs/base/common/event';
import { Event, Emitter } from 'vs/base/common/event';
import { URI } from 'vs/base/common/uri';
export const enum AuthTokenStatus {
Disabled = 'Disabled',
@ -19,11 +20,10 @@ export interface IAuthTokenService {
readonly status: AuthTokenStatus;
readonly onDidChangeStatus: Event<AuthTokenStatus>;
readonly _onDidGetCallback: Emitter<URI>;
getToken(): Promise<string | null>;
updateToken(token: string): Promise<void>;
getToken(): Promise<string | undefined>;
refreshToken(): Promise<void>;
deleteToken(): Promise<void>;
login(callbackUri?: URI): Promise<void>;
logout(): Promise<void>;
}

View file

@ -22,9 +22,12 @@ export class AuthTokenChannel implements IServerChannel {
switch (command) {
case '_getInitialStatus': return Promise.resolve(this.service.status);
case 'getToken': return this.service.getToken();
case 'updateToken': return this.service.updateToken(args[0]);
case 'exchangeCodeForToken':
this.service._onDidGetCallback.fire(args);
return Promise.resolve();
case 'refreshToken': return this.service.refreshToken();
case 'deleteToken': return this.service.deleteToken();
case 'login': return this.service.login(args);
case 'logout': return this.service.logout();
}
throw new Error('Invalid call');
}

Some files were not shown because too many files have changed in this diff Show more