Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commited584b2

Browse files
committed
Merge branch 'main' into seanmcm/1_2_0_insiders_updates
2 parentsf7cab67 +8e8482b commited584b2

File tree

2 files changed

+31
-29
lines changed

2 files changed

+31
-29
lines changed

‎Extension/src/LanguageServer/extension.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,10 +432,10 @@ export function processDelayedDidOpen(document: vscode.TextDocument): void {
432432
constclient:Client=clients.getClientFor(document.uri);
433433
if(client){
434434
// Log warm start.
435-
clients.timeTelemetryCollector.setDidOpenTime(document.uri);
436435
if(clients.checkOwnership(client,document)){
437436
if(!client.TrackedDocuments.has(document)){
438437
// If not yet tracked, process as a newly opened file. (didOpen is sent to server in client.takeOwnership()).
438+
clients.timeTelemetryCollector.setDidOpenTime(document.uri);
439439
client.TrackedDocuments.add(document);
440440
constfinishDidOpen=(doc:vscode.TextDocument)=>{
441441
client.provideCustomConfiguration(doc.uri,undefined);

‎Extension/src/LanguageServer/protocolFilter.ts‎

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,40 +26,42 @@ export function createProtocolFilter(clients: ClientCollection): Middleware {
2626
didOpen:(document,sendMessage)=>{
2727
consteditor:vscode.TextEditor|undefined=vscode.window.visibleTextEditors.find(e=>e.document===document);
2828
if(editor){
29-
// Log warm start.
30-
clients.timeTelemetryCollector.setDidOpenTime(document.uri);
3129
// If the file was visible editor when we were activated, we will not get a call to
3230
// onDidChangeVisibleTextEditors, so immediately open any file that is visible when we receive didOpen.
3331
// Otherwise, we defer opening the file until it's actually visible.
3432
constme:Client=clients.getClientFor(document.uri);
35-
if(clients.checkOwnership(me,document)){
36-
me.TrackedDocuments.add(document);
37-
constfinishDidOpen=(doc:vscode.TextDocument)=>{
38-
me.provideCustomConfiguration(doc.uri,undefined);
39-
me.notifyWhenReady(()=>{
40-
sendMessage(doc);
41-
me.onDidOpenTextDocument(doc);
42-
if(editor&&editor===vscode.window.activeTextEditor){
43-
onDidChangeActiveTextEditor(editor);
44-
}
45-
});
46-
};
47-
letlanguageChanged:boolean=false;
48-
if((document.uri.path.endsWith(".C")||document.uri.path.endsWith(".H"))&&document.languageId==="c"){
49-
constcppSettings:CppSettings=newCppSettings();
50-
if(cppSettings.autoAddFileAssociations){
51-
constfileName:string=path.basename(document.uri.fsPath);
52-
constmappingString:string=fileName+"@"+document.uri.fsPath;
53-
me.addFileAssociations(mappingString,false);
54-
me.sendDidChangeSettings({files:{associations:newOtherSettings().filesAssociations}});
55-
vscode.languages.setTextDocumentLanguage(document,"cpp").then((newDoc:vscode.TextDocument)=>{
56-
finishDidOpen(newDoc);
33+
if(!me.TrackedDocuments.has(document)){
34+
// Log warm start.
35+
clients.timeTelemetryCollector.setDidOpenTime(document.uri);
36+
if(clients.checkOwnership(me,document)){
37+
me.TrackedDocuments.add(document);
38+
constfinishDidOpen=(doc:vscode.TextDocument)=>{
39+
me.provideCustomConfiguration(doc.uri,undefined);
40+
me.notifyWhenReady(()=>{
41+
sendMessage(doc);
42+
me.onDidOpenTextDocument(doc);
43+
if(editor&&editor===vscode.window.activeTextEditor){
44+
onDidChangeActiveTextEditor(editor);
45+
}
5746
});
58-
languageChanged=true;
47+
};
48+
letlanguageChanged:boolean=false;
49+
if((document.uri.path.endsWith(".C")||document.uri.path.endsWith(".H"))&&document.languageId==="c"){
50+
constcppSettings:CppSettings=newCppSettings();
51+
if(cppSettings.autoAddFileAssociations){
52+
constfileName:string=path.basename(document.uri.fsPath);
53+
constmappingString:string=fileName+"@"+document.uri.fsPath;
54+
me.addFileAssociations(mappingString,false);
55+
me.sendDidChangeSettings({files:{associations:newOtherSettings().filesAssociations}});
56+
vscode.languages.setTextDocumentLanguage(document,"cpp").then((newDoc:vscode.TextDocument)=>{
57+
finishDidOpen(newDoc);
58+
});
59+
languageChanged=true;
60+
}
61+
}
62+
if(!languageChanged){
63+
finishDidOpen(document);
5964
}
60-
}
61-
if(!languageChanged){
62-
finishDidOpen(document);
6365
}
6466
}
6567
}else{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp