Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Extension/ui/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,9 @@
<div class="section">
<div class="section-title">Include path</div>
<div class="section-text">
A list of paths for the IntelliSense engine to use while searching for included headers. If a path ends with <code>/**</code> the IntelliSense engine will do a recursive search for headers starting from that directory.
An include path is a folder that contains header files (such as <code>#include "myHeaderFile.h"</code>) that are included in a source file.
Specify a list paths for the IntelliSense engine to use while searching for included header files.
If a path ends with <code>/**</code> the IntelliSense engine will do a recursive search for header files starting from that directory.
</div>
<div>
<div class="section-note">One include path per line.</div>
Expand Down Expand Up @@ -573,7 +575,7 @@
The ID of a VS Code extension that can provide IntelliSense configuration information for source files.
</div>
<div>
<input name="inputValue" id="configurationProvider" style="width: 300px"></input>
<input name="inputValue" id="configurationProvider" style="width: 290px"></input>
</div>
</div>

Expand All @@ -583,7 +585,7 @@
Version of the Windows SDK include path to use on Windows, e.g. <code>10.0.17134.0</code>.
</div>
<div>
<input name="inputValue" id="windowsSdkVersion" style="width: 300px"></input>
<input name="inputValue" id="windowsSdkVersion" style="width: 290px"></input>
</div>
</div>

Expand Down
34 changes: 18 additions & 16 deletions Extension/ui/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class SettingsApp {
constructor() {
this.vsCodeApi = acquireVsCodeApi();

window.addEventListener("keydown", this.handleTab.bind(this));
window.addEventListener("keydown", this.onTabKeyDown.bind(this));
window.addEventListener("message", this.onMessageReceived.bind(this));

// Add event listeners to UI elements
Expand Down Expand Up @@ -93,18 +93,18 @@ class SettingsApp {
document.getElementById(elementId.addConfigCancel).addEventListener("click", this.OnAddConfigConfirm.bind(this, false));
}

private handleTab(e: any): void {
private onTabKeyDown(e: any): void {
if (e.keyCode === 9) {
document.body.classList.add("tabbing");
window.removeEventListener("keydown", this.handleTab);
window.addEventListener("mousedown", this.handleMouseDown.bind(this));
window.removeEventListener("keydown", this.onTabKeyDown);
window.addEventListener("mousedown", this.onMouseDown.bind(this));
}
}

private handleMouseDown(): void {
private onMouseDown(): void {
document.body.classList.remove("tabbing");
window.removeEventListener("mousedown", this.handleMouseDown);
window.addEventListener("keydown", this.handleTab.bind(this));
window.removeEventListener("mousedown", this.onMouseDown);
window.addEventListener("keydown", this.onTabKeyDown.bind(this));
}

private onShowAdvanced(): void {
Expand All @@ -129,14 +129,16 @@ class SettingsApp {
this.showElement(elementId.addConfigInputDiv, false);
this.showElement(elementId.addConfigDiv, true);

// If request is yes, send message to create new config
// If request is yes, send message to create new config
if (request) {
const x: HTMLInputElement = <HTMLInputElement>document.getElementById(elementId.addConfigName);
if (x.value !== undefined && x.value !== "") {
const el: HTMLInputElement = <HTMLInputElement>document.getElementById(elementId.addConfigName);
if (el.value !== undefined && el.value !== "") {
this.vsCodeApi.postMessage({
command: "addConfig",
name: x.value
name: el.value
});

el.value = "";
}
}
}
Expand Down Expand Up @@ -166,21 +168,21 @@ class SettingsApp {
return;
}

const x: HTMLSelectElement = <HTMLSelectElement>document.getElementById(elementId.configSelection);
(<HTMLInputElement>document.getElementById(elementId.configName)).value = x.value;
const el: HTMLSelectElement = <HTMLSelectElement>document.getElementById(elementId.configSelection);
(<HTMLInputElement>document.getElementById(elementId.configName)).value = el.value;

this.vsCodeApi.postMessage({
command: "configSelect",
index: x.selectedIndex
index: el.selectedIndex
});
}

private onKnownCompilerSelect(): void {
if (this.updating) {
return;
}
const x: HTMLInputElement = <HTMLInputElement>document.getElementById(elementId.knownCompilers);
(<HTMLInputElement>document.getElementById(elementId.compilerPath)).value = x.value;
const el: HTMLInputElement = <HTMLInputElement>document.getElementById(elementId.knownCompilers);
(<HTMLInputElement>document.getElementById(elementId.compilerPath)).value = el.value;
this.onChanged(elementId.compilerPath);

// Post message that this control was used for telemetry
Expand Down