mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Fix hygiene
This commit is contained in:
parent
4f62f9b594
commit
0bf3071972
|
@ -1,4 +1,9 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
.vscode-dark img[src$=\#gh-light-mode-only],
|
.vscode-dark img[src$=\#gh-light-mode-only],
|
||||||
.vscode-light img[src$=\#gh-dark-mode-only] {
|
.vscode-light img[src$=\#gh-dark-mode-only] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ export function getHTMLMode(htmlLanguageService: HTMLLanguageService, workspace:
|
||||||
async getFoldingRanges(document: TextDocument): Promise<FoldingRange[]> {
|
async getFoldingRanges(document: TextDocument): Promise<FoldingRange[]> {
|
||||||
return htmlLanguageService.getFoldingRanges(document);
|
return htmlLanguageService.getFoldingRanges(document);
|
||||||
},
|
},
|
||||||
async doAutoInsert(document: TextDocument, position: Position, kind: 'autoQuote' | 'autoClose', settings = workspace.settings) {
|
async doAutoInsert(document: TextDocument, position: Position, kind: 'autoQuote' | 'autoClose', settings = workspace.settings) {
|
||||||
const offset = document.offsetAt(position);
|
const offset = document.offsetAt(position);
|
||||||
const text = document.getText();
|
const text = document.getText();
|
||||||
if (kind === 'autoQuote') {
|
if (kind === 'autoQuote') {
|
||||||
|
|
|
@ -40,10 +40,10 @@
|
||||||
|
|
||||||
.monaco-progress-container.infinite.infinite-long-running .progress-bit {
|
.monaco-progress-container.infinite.infinite-long-running .progress-bit {
|
||||||
/*
|
/*
|
||||||
The more smooth `linear` timing function can cause
|
The more smooth `linear` timing function can cause
|
||||||
higher GPU consumption as indicated in
|
higher GPU consumption as indicated in
|
||||||
https://github.com/microsoft/vscode/issues/97900 &
|
https://github.com/microsoft/vscode/issues/97900 &
|
||||||
https://github.com/microsoft/vscode/issues/138396
|
https://github.com/microsoft/vscode/issues/138396
|
||||||
*/
|
*/
|
||||||
animation-timing-function: steps(100);
|
animation-timing-function: steps(100);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,12 +39,12 @@ export class Codicon implements CSSIcon {
|
||||||
public get cssSelector() { return '.codicon.codicon-' + this.id; }
|
public get cssSelector() { return '.codicon.codicon-' + this.id; }
|
||||||
|
|
||||||
// registry
|
// registry
|
||||||
private static _allCodicons : Codicon[] = [];
|
private static _allCodicons: Codicon[] = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns Returns all default icons covered by the codicon font. Only to be used by the icon registry in platform.
|
* @returns Returns all default icons covered by the codicon font. Only to be used by the icon registry in platform.
|
||||||
*/
|
*/
|
||||||
public static getAll() : readonly Codicon[] {
|
public static getAll(): readonly Codicon[] {
|
||||||
return Codicon._allCodicons;
|
return Codicon._allCodicons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,86 +65,86 @@ function doFindFreePort(startPort: number, giveUpAfter: number, stride: number,
|
||||||
|
|
||||||
// Reference: https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/net/base/port_util.cc#56
|
// Reference: https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/net/base/port_util.cc#56
|
||||||
export const BROWSER_RESTRICTED_PORTS: any = {
|
export const BROWSER_RESTRICTED_PORTS: any = {
|
||||||
1: true, // tcpmux
|
1: true, // tcpmux
|
||||||
7: true, // echo
|
7: true, // echo
|
||||||
9: true, // discard
|
9: true, // discard
|
||||||
11: true, // systat
|
11: true, // systat
|
||||||
13: true, // daytime
|
13: true, // daytime
|
||||||
15: true, // netstat
|
15: true, // netstat
|
||||||
17: true, // qotd
|
17: true, // qotd
|
||||||
19: true, // chargen
|
19: true, // chargen
|
||||||
20: true, // ftp data
|
20: true, // ftp data
|
||||||
21: true, // ftp access
|
21: true, // ftp access
|
||||||
22: true, // ssh
|
22: true, // ssh
|
||||||
23: true, // telnet
|
23: true, // telnet
|
||||||
25: true, // smtp
|
25: true, // smtp
|
||||||
37: true, // time
|
37: true, // time
|
||||||
42: true, // name
|
42: true, // name
|
||||||
43: true, // nicname
|
43: true, // nicname
|
||||||
53: true, // domain
|
53: true, // domain
|
||||||
69: true, // tftp
|
69: true, // tftp
|
||||||
77: true, // priv-rjs
|
77: true, // priv-rjs
|
||||||
79: true, // finger
|
79: true, // finger
|
||||||
87: true, // ttylink
|
87: true, // ttylink
|
||||||
95: true, // supdup
|
95: true, // supdup
|
||||||
101: true, // hostriame
|
101: true, // hostriame
|
||||||
102: true, // iso-tsap
|
102: true, // iso-tsap
|
||||||
103: true, // gppitnp
|
103: true, // gppitnp
|
||||||
104: true, // acr-nema
|
104: true, // acr-nema
|
||||||
109: true, // pop2
|
109: true, // pop2
|
||||||
110: true, // pop3
|
110: true, // pop3
|
||||||
111: true, // sunrpc
|
111: true, // sunrpc
|
||||||
113: true, // auth
|
113: true, // auth
|
||||||
115: true, // sftp
|
115: true, // sftp
|
||||||
117: true, // uucp-path
|
117: true, // uucp-path
|
||||||
119: true, // nntp
|
119: true, // nntp
|
||||||
123: true, // NTP
|
123: true, // NTP
|
||||||
135: true, // loc-srv /epmap
|
135: true, // loc-srv /epmap
|
||||||
137: true, // netbios
|
137: true, // netbios
|
||||||
139: true, // netbios
|
139: true, // netbios
|
||||||
143: true, // imap2
|
143: true, // imap2
|
||||||
161: true, // snmp
|
161: true, // snmp
|
||||||
179: true, // BGP
|
179: true, // BGP
|
||||||
389: true, // ldap
|
389: true, // ldap
|
||||||
427: true, // SLP (Also used by Apple Filing Protocol)
|
427: true, // SLP (Also used by Apple Filing Protocol)
|
||||||
465: true, // smtp+ssl
|
465: true, // smtp+ssl
|
||||||
512: true, // print / exec
|
512: true, // print / exec
|
||||||
513: true, // login
|
513: true, // login
|
||||||
514: true, // shell
|
514: true, // shell
|
||||||
515: true, // printer
|
515: true, // printer
|
||||||
526: true, // tempo
|
526: true, // tempo
|
||||||
530: true, // courier
|
530: true, // courier
|
||||||
531: true, // chat
|
531: true, // chat
|
||||||
532: true, // netnews
|
532: true, // netnews
|
||||||
540: true, // uucp
|
540: true, // uucp
|
||||||
548: true, // AFP (Apple Filing Protocol)
|
548: true, // AFP (Apple Filing Protocol)
|
||||||
554: true, // rtsp
|
554: true, // rtsp
|
||||||
556: true, // remotefs
|
556: true, // remotefs
|
||||||
563: true, // nntp+ssl
|
563: true, // nntp+ssl
|
||||||
587: true, // smtp (rfc6409)
|
587: true, // smtp (rfc6409)
|
||||||
601: true, // syslog-conn (rfc3195)
|
601: true, // syslog-conn (rfc3195)
|
||||||
636: true, // ldap+ssl
|
636: true, // ldap+ssl
|
||||||
989: true, // ftps-data
|
989: true, // ftps-data
|
||||||
990: true, // ftps
|
990: true, // ftps
|
||||||
993: true, // ldap+ssl
|
993: true, // ldap+ssl
|
||||||
995: true, // pop3+ssl
|
995: true, // pop3+ssl
|
||||||
1719: true, // h323gatestat
|
1719: true, // h323gatestat
|
||||||
1720: true, // h323hostcall
|
1720: true, // h323hostcall
|
||||||
1723: true, // pptp
|
1723: true, // pptp
|
||||||
2049: true, // nfs
|
2049: true, // nfs
|
||||||
3659: true, // apple-sasl / PasswordServer
|
3659: true, // apple-sasl / PasswordServer
|
||||||
4045: true, // lockd
|
4045: true, // lockd
|
||||||
5060: true, // sip
|
5060: true, // sip
|
||||||
5061: true, // sips
|
5061: true, // sips
|
||||||
6000: true, // X11
|
6000: true, // X11
|
||||||
6566: true, // sane-port
|
6566: true, // sane-port
|
||||||
6665: true, // Alternate IRC [Apple addition]
|
6665: true, // Alternate IRC [Apple addition]
|
||||||
6666: true, // Alternate IRC [Apple addition]
|
6666: true, // Alternate IRC [Apple addition]
|
||||||
6667: true, // Standard IRC [Apple addition]
|
6667: true, // Standard IRC [Apple addition]
|
||||||
6668: true, // Alternate IRC [Apple addition]
|
6668: true, // Alternate IRC [Apple addition]
|
||||||
6669: true, // Alternate IRC [Apple addition]
|
6669: true, // Alternate IRC [Apple addition]
|
||||||
6697: true, // IRC + TLS
|
6697: true, // IRC + TLS
|
||||||
10080: true // Amanda
|
10080: true // Amanda
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -191,7 +191,7 @@ export class ExtensionManagementCLIService implements IExtensionManagementCLISer
|
||||||
private async getGalleryExtensions(extensions: InstallExtensionInfo[]): Promise<Map<string, IGalleryExtension>> {
|
private async getGalleryExtensions(extensions: InstallExtensionInfo[]): Promise<Map<string, IGalleryExtension>> {
|
||||||
const galleryExtensions = new Map<string, IGalleryExtension>();
|
const galleryExtensions = new Map<string, IGalleryExtension>();
|
||||||
const preRelease = extensions.some(e => e.installOptions.installPreReleaseVersion);
|
const preRelease = extensions.some(e => e.installOptions.installPreReleaseVersion);
|
||||||
const result = await this.extensionGalleryService.getExtensions(extensions.map(e => ({...e, preRelease})), CancellationToken.None);
|
const result = await this.extensionGalleryService.getExtensions(extensions.map(e => ({ ...e, preRelease })), CancellationToken.None);
|
||||||
for (const extension of result) {
|
for (const extension of result) {
|
||||||
galleryExtensions.set(extension.identifier.id.toLowerCase(), extension);
|
galleryExtensions.set(extension.identifier.id.toLowerCase(), extension);
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ export class NativeStorageService extends AbstractStorageService {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async doInitialize(): Promise<void> {
|
protected async doInitialize(): Promise<void> {
|
||||||
|
|
||||||
// Init all storage locations
|
// Init all storage locations
|
||||||
await Promises.settled([
|
await Promises.settled([
|
||||||
this.globalStorage.init(),
|
this.globalStorage.init(),
|
||||||
|
|
|
@ -52,19 +52,19 @@ export class WorkspacesMainService implements AddFirstParameterToFunctions<IWork
|
||||||
|
|
||||||
readonly onDidChangeRecentlyOpened = this.workspacesHistoryMainService.onDidChangeRecentlyOpened;
|
readonly onDidChangeRecentlyOpened = this.workspacesHistoryMainService.onDidChangeRecentlyOpened;
|
||||||
|
|
||||||
getRecentlyOpened(windowId: number): Promise<IRecentlyOpened> {
|
getRecentlyOpened(windowId: number): Promise<IRecentlyOpened> {
|
||||||
return this.workspacesHistoryMainService.getRecentlyOpened(this.windowsMainService.getWindowById(windowId));
|
return this.workspacesHistoryMainService.getRecentlyOpened(this.windowsMainService.getWindowById(windowId));
|
||||||
}
|
}
|
||||||
|
|
||||||
addRecentlyOpened(windowId: number, recents: IRecent[]): Promise<void> {
|
addRecentlyOpened(windowId: number, recents: IRecent[]): Promise<void> {
|
||||||
return this.workspacesHistoryMainService.addRecentlyOpened(recents);
|
return this.workspacesHistoryMainService.addRecentlyOpened(recents);
|
||||||
}
|
}
|
||||||
|
|
||||||
removeRecentlyOpened(windowId: number, paths: URI[]): Promise<void> {
|
removeRecentlyOpened(windowId: number, paths: URI[]): Promise<void> {
|
||||||
return this.workspacesHistoryMainService.removeRecentlyOpened(paths);
|
return this.workspacesHistoryMainService.removeRecentlyOpened(paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
clearRecentlyOpened(windowId: number): Promise<void> {
|
clearRecentlyOpened(windowId: number): Promise<void> {
|
||||||
return this.workspacesHistoryMainService.clearRecentlyOpened();
|
return this.workspacesHistoryMainService.clearRecentlyOpened();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ export class MainThreadNotebookKernels implements MainThreadNotebookKernelsShape
|
||||||
this._disposables.add(toDisposable(() => {
|
this._disposables.add(toDisposable(() => {
|
||||||
// EH shut down, complete all executions started by this EH
|
// EH shut down, complete all executions started by this EH
|
||||||
this._executions.forEach(e => {
|
this._executions.forEach(e => {
|
||||||
e.complete({ });
|
e.complete({});
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -175,7 +175,7 @@ class TreeViewDragAndDropController implements ITreeViewDragAndDropController {
|
||||||
private readonly _proxy: ExtHostTreeViewsShape) { }
|
private readonly _proxy: ExtHostTreeViewsShape) { }
|
||||||
|
|
||||||
async handleDrop(dataTransfer: ITreeDataTransfer, targetTreeItem: ITreeItem, token: CancellationToken,
|
async handleDrop(dataTransfer: ITreeDataTransfer, targetTreeItem: ITreeItem, token: CancellationToken,
|
||||||
operationUuid?: string, sourceTreeId?: string, sourceTreeItemHandles?: string[]): Promise<void> {
|
operationUuid?: string, sourceTreeId?: string, sourceTreeItemHandles?: string[]): Promise<void> {
|
||||||
return this._proxy.$handleDrop(this.treeViewId, await TreeDataTransferConverter.toTreeDataTransferDTO(dataTransfer), targetTreeItem.handle, token, operationUuid, sourceTreeId, sourceTreeItemHandles);
|
return this._proxy.$handleDrop(this.treeViewId, await TreeDataTransferConverter.toTreeDataTransferDTO(dataTransfer), targetTreeItem.handle, token, operationUuid, sourceTreeId, sourceTreeItemHandles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ declare namespace self {
|
||||||
let addEventListener: any;
|
let addEventListener: any;
|
||||||
let removeEventListener: any;
|
let removeEventListener: any;
|
||||||
let dispatchEvent: any;
|
let dispatchEvent: any;
|
||||||
let indexedDB: { open: any; [k: string]: any };
|
let indexedDB: { open: any;[k: string]: any };
|
||||||
let caches: { open: any; [k: string]: any };
|
let caches: { open: any;[k: string]: any };
|
||||||
let importScripts: any;
|
let importScripts: any;
|
||||||
let fetch: _Fetch;
|
let fetch: _Fetch;
|
||||||
let XMLHttpRequest: any;
|
let XMLHttpRequest: any;
|
||||||
|
|
|
@ -165,7 +165,7 @@ export async function extractTreeDropData(dataTransfer: ITreeDataTransfer): Prom
|
||||||
// Invalid transfer
|
// Invalid transfer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return editors;
|
return editors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -532,7 +532,7 @@ class ResourceLabelWidget extends IconLabel {
|
||||||
(!this.options?.title)
|
(!this.options?.title)
|
||||||
|| ((typeof this.options.title !== 'string') && !this.options.title.markdownNotSupportedFallback)
|
|| ((typeof this.options.title !== 'string') && !this.options.title.markdownNotSupportedFallback)
|
||||||
)) {
|
)) {
|
||||||
|
|
||||||
if (!this.computedPathLabel) {
|
if (!this.computedPathLabel) {
|
||||||
this.computedPathLabel = this.labelService.getUriLabel(resource);
|
this.computedPathLabel = this.labelService.getUriLabel(resource);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ export class DynamicEditorGroupAutoLockConfiguration extends Disposable implemen
|
||||||
// (atleast 20 times) while the extensions are getting registered.
|
// (atleast 20 times) while the extensions are getting registered.
|
||||||
// As such push out the dynamic editor auto lock configuration
|
// As such push out the dynamic editor auto lock configuration
|
||||||
// until after extensions registered.
|
// until after extensions registered.
|
||||||
(async ()=> {
|
(async () => {
|
||||||
await extensionService.whenInstalledExtensionsRegistered();
|
await extensionService.whenInstalledExtensionsRegistered();
|
||||||
|
|
||||||
this.updateConfiguration();
|
this.updateConfiguration();
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { INotificationsModel, INotificationChangeEvent, NotificationChangeType,
|
||||||
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
|
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
|
||||||
import { Emitter } from 'vs/base/common/event';
|
import { Emitter } from 'vs/base/common/event';
|
||||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||||
import { INotificationsCenterController } from 'vs/workbench/browser/parts/notifications/notificationsCommands';
|
import { INotificationsCenterController } from 'vs/workbench/browser/parts/notifications/notificationsCommands';
|
||||||
import { NotificationsList } from 'vs/workbench/browser/parts/notifications/notificationsList';
|
import { NotificationsList } from 'vs/workbench/browser/parts/notifications/notificationsList';
|
||||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import { isAncestor, Dimension } from 'vs/base/browser/dom';
|
import { isAncestor, Dimension } from 'vs/base/browser/dom';
|
||||||
|
|
|
@ -257,9 +257,9 @@ function convertPaths(msg: DebugProtocol.ProtocolMessage, fixSourcePath: (toDA:
|
||||||
case 'setBreakpoints':
|
case 'setBreakpoints':
|
||||||
(<DebugProtocol.SetBreakpointsResponse>response).body.breakpoints.forEach(bp => fixSourcePath(false, bp.source));
|
(<DebugProtocol.SetBreakpointsResponse>response).body.breakpoints.forEach(bp => fixSourcePath(false, bp.source));
|
||||||
break;
|
break;
|
||||||
case 'disassemble':
|
case 'disassemble':
|
||||||
{
|
{
|
||||||
const di = <DebugProtocol.DisassembleResponse> response;
|
const di = <DebugProtocol.DisassembleResponse>response;
|
||||||
if (di.body) {
|
if (di.body) {
|
||||||
di.body.instructions.forEach(di => fixSourcePath(false, di.location));
|
di.body.instructions.forEach(di => fixSourcePath(false, di.location));
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,12 +130,12 @@
|
||||||
|
|
||||||
.monaco-workbench .simple-fr-find-part-wrapper .find-filter-button {
|
.monaco-workbench .simple-fr-find-part-wrapper .find-filter-button {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
float: left;
|
float: left;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.find-filter-button .monaco-action-bar .action-label {
|
.find-filter-button .monaco-action-bar .action-label {
|
||||||
|
|
|
@ -1,79 +1,79 @@
|
||||||
|
|
||||||
if [ -z "$VSCODE_SHELL_LOGIN" ]; then
|
if [ -z "$VSCODE_SHELL_LOGIN" ]; then
|
||||||
. ~/.bashrc
|
. ~/.bashrc
|
||||||
else
|
else
|
||||||
# Imitate -l because --init-file doesn't support it:
|
# Imitate -l because --init-file doesn't support it:
|
||||||
# run the first of these files that exists
|
# run the first of these files that exists
|
||||||
if [ -f ~/.bash_profile ]; then
|
if [ -f ~/.bash_profile ]; then
|
||||||
. ~/.bash_profile
|
. ~/.bash_profile
|
||||||
elif [ -f ~/.bash_login ]; then
|
elif [ -f ~/.bash_login ]; then
|
||||||
. ~/.bash_login
|
. ~/.bash_login
|
||||||
elif [ -f ~/.profile ]; then
|
elif [ -f ~/.profile ]; then
|
||||||
. ~/.profile
|
. ~/.profile
|
||||||
fi
|
fi
|
||||||
VSCODE_SHELL_LOGIN=""
|
VSCODE_SHELL_LOGIN=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
IN_COMMAND_EXECUTION="1"
|
IN_COMMAND_EXECUTION="1"
|
||||||
prompt_start() {
|
prompt_start() {
|
||||||
printf "\033]133;A\007"
|
printf "\033]133;A\007"
|
||||||
}
|
}
|
||||||
|
|
||||||
prompt_end() {
|
prompt_end() {
|
||||||
printf "\033]133;B\007"
|
printf "\033]133;B\007"
|
||||||
}
|
}
|
||||||
|
|
||||||
update_cwd() {
|
update_cwd() {
|
||||||
printf "\033]1337;CurrentDir=%s\007" "$PWD"
|
printf "\033]1337;CurrentDir=%s\007" "$PWD"
|
||||||
}
|
}
|
||||||
|
|
||||||
command_output_start() {
|
command_output_start() {
|
||||||
printf "\033]133;C\007"
|
printf "\033]133;C\007"
|
||||||
}
|
}
|
||||||
|
|
||||||
command_complete() {
|
command_complete() {
|
||||||
printf "\033]133;D;%s\007" "$STATUS"
|
printf "\033]133;D;%s\007" "$STATUS"
|
||||||
update_cwd
|
update_cwd
|
||||||
}
|
}
|
||||||
|
|
||||||
update_prompt() {
|
update_prompt() {
|
||||||
PRIOR_PROMPT="$PS1"
|
PRIOR_PROMPT="$PS1"
|
||||||
IN_COMMAND_EXECUTION=""
|
IN_COMMAND_EXECUTION=""
|
||||||
PS1="$(prompt_start)$PREFIX$PS1$(prompt_end)"
|
PS1="$(prompt_start)$PREFIX$PS1$(prompt_end)"
|
||||||
}
|
}
|
||||||
|
|
||||||
precmd() {
|
precmd() {
|
||||||
local STATUS="$?"
|
local STATUS="$?"
|
||||||
command_complete "$STATUS"
|
command_complete "$STATUS"
|
||||||
|
|
||||||
# in command execution
|
# in command execution
|
||||||
if [ -n "$IN_COMMAND_EXECUTION" ]; then
|
if [ -n "$IN_COMMAND_EXECUTION" ]; then
|
||||||
# non null
|
# non null
|
||||||
update_prompt
|
update_prompt
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
preexec() {
|
preexec() {
|
||||||
PS1="$PRIOR_PROMPT"
|
PS1="$PRIOR_PROMPT"
|
||||||
if [ -z "${IN_COMMAND_EXECUTION-}" ]; then
|
if [ -z "${IN_COMMAND_EXECUTION-}" ]; then
|
||||||
IN_COMMAND_EXECUTION="1"
|
IN_COMMAND_EXECUTION="1"
|
||||||
command_output_start
|
command_output_start
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
update_prompt
|
update_prompt
|
||||||
export ORIGINAL_PROMPT_COMMAND=$PROMPT_COMMAND
|
export ORIGINAL_PROMPT_COMMAND=$PROMPT_COMMAND
|
||||||
|
|
||||||
prompt_cmd() {
|
prompt_cmd() {
|
||||||
precmd
|
precmd
|
||||||
}
|
}
|
||||||
original_prompt_cmd() {
|
original_prompt_cmd() {
|
||||||
${ORIGINAL_PROMPT_COMMAND}
|
${ORIGINAL_PROMPT_COMMAND}
|
||||||
prompt_cmd
|
prompt_cmd
|
||||||
}
|
}
|
||||||
if [ -n "$ORIGINAL_PROMPT_COMMAND" ]; then
|
if [ -n "$ORIGINAL_PROMPT_COMMAND" ]; then
|
||||||
export PROMPT_COMMAND=original_prompt_cmd
|
export PROMPT_COMMAND=original_prompt_cmd
|
||||||
else
|
else
|
||||||
export PROMPT_COMMAND=prompt_cmd
|
export PROMPT_COMMAND=prompt_cmd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trap 'preexec' DEBUG
|
trap 'preexec' DEBUG
|
||||||
|
|
|
@ -1,51 +1,51 @@
|
||||||
IN_COMMAND_EXECUTION="1"
|
IN_COMMAND_EXECUTION="1"
|
||||||
prompt_start() {
|
prompt_start() {
|
||||||
printf "\033]133;A\007"
|
printf "\033]133;A\007"
|
||||||
}
|
}
|
||||||
|
|
||||||
prompt_end() {
|
prompt_end() {
|
||||||
printf "\033]133;B\007"
|
printf "\033]133;B\007"
|
||||||
}
|
}
|
||||||
|
|
||||||
update_cwd() {
|
update_cwd() {
|
||||||
printf "\033]1337;CurrentDir=%s\007" "$PWD"
|
printf "\033]1337;CurrentDir=%s\007" "$PWD"
|
||||||
}
|
}
|
||||||
|
|
||||||
command_output_start() {
|
command_output_start() {
|
||||||
printf "\033]133;C\007"
|
printf "\033]133;C\007"
|
||||||
}
|
}
|
||||||
|
|
||||||
command_complete() {
|
command_complete() {
|
||||||
printf "\033]133;D;%s\007" "$STATUS"
|
printf "\033]133;D;%s\007" "$STATUS"
|
||||||
update_cwd
|
update_cwd
|
||||||
}
|
}
|
||||||
|
|
||||||
update_prompt() {
|
update_prompt() {
|
||||||
PRIOR_PROMPT="$PS1"
|
PRIOR_PROMPT="$PS1"
|
||||||
IN_COMMAND_EXECUTION=""
|
IN_COMMAND_EXECUTION=""
|
||||||
PS1="$(prompt_start)$PREFIX$PS1$(prompt_end)"
|
PS1="$(prompt_start)$PREFIX$PS1$(prompt_end)"
|
||||||
}
|
}
|
||||||
|
|
||||||
precmd() {
|
precmd() {
|
||||||
local STATUS="$?"
|
local STATUS="$?"
|
||||||
if [ -z "${IN_COMMAND_EXECUTION-}" ]; then
|
if [ -z "${IN_COMMAND_EXECUTION-}" ]; then
|
||||||
# not in command execution
|
# not in command execution
|
||||||
command_output_start
|
command_output_start
|
||||||
fi
|
fi
|
||||||
|
|
||||||
command_complete "$STATUS"
|
command_complete "$STATUS"
|
||||||
|
|
||||||
# in command execution
|
# in command execution
|
||||||
if [ -n "$IN_COMMAND_EXECUTION" ]; then
|
if [ -n "$IN_COMMAND_EXECUTION" ]; then
|
||||||
# non null
|
# non null
|
||||||
update_prompt
|
update_prompt
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
preexec() {
|
preexec() {
|
||||||
PS1="$PRIOR_PROMPT"
|
PS1="$PRIOR_PROMPT"
|
||||||
IN_COMMAND_EXECUTION="1"
|
IN_COMMAND_EXECUTION="1"
|
||||||
command_output_start
|
command_output_start
|
||||||
}
|
}
|
||||||
precmd_functions+=($precmd_functions precmd)
|
precmd_functions+=($precmd_functions precmd)
|
||||||
preexec_functions+=($preexec_functions preexec)
|
preexec_functions+=($preexec_functions preexec)
|
||||||
|
|
|
@ -767,8 +767,8 @@ class TestingOutputPeek extends PeekViewWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override _relayout(newHeightInLines: number): void {
|
protected override _relayout(newHeightInLines: number): void {
|
||||||
super._relayout(newHeightInLines);
|
super._relayout(newHeightInLines);
|
||||||
TestingOutputPeek.lastHeightInLines = newHeightInLines;
|
TestingOutputPeek.lastHeightInLines = newHeightInLines;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @override */
|
/** @override */
|
||||||
|
|
|
@ -279,7 +279,7 @@ export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvi
|
||||||
extensionHostDebugEnvironment.extensionDevelopmentLocationURI = developmentOptions.extensions.map(e => URI.revive(e));
|
extensionHostDebugEnvironment.extensionDevelopmentLocationURI = developmentOptions.extensions.map(e => URI.revive(e));
|
||||||
extensionHostDebugEnvironment.isExtensionDevelopment = true;
|
extensionHostDebugEnvironment.isExtensionDevelopment = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (developmentOptions.extensionTestsPath) {
|
if (developmentOptions.extensionTestsPath) {
|
||||||
extensionHostDebugEnvironment.extensionTestsLocationURI = URI.revive(developmentOptions.extensionTestsPath);
|
extensionHostDebugEnvironment.extensionTestsLocationURI = URI.revive(developmentOptions.extensionTestsPath);
|
||||||
}
|
}
|
||||||
|
|
|
@ -320,7 +320,7 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService {
|
||||||
return resolvedKeybinding.getDispatchParts().map(x => x || '[null]').join(' ');
|
return resolvedKeybinding.getDispatchParts().map(x => x || '[null]').join(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
private _printResolvedKeybindings(output:string[], input: string, resolvedKeybindings: ResolvedKeybinding[]): void {
|
private _printResolvedKeybindings(output: string[], input: string, resolvedKeybindings: ResolvedKeybinding[]): void {
|
||||||
const padLength = 35;
|
const padLength = 35;
|
||||||
const firstRow = `${input.padStart(padLength, ' ')} => `;
|
const firstRow = `${input.padStart(padLength, ' ')} => `;
|
||||||
if (resolvedKeybindings.length === 0) {
|
if (resolvedKeybindings.length === 0) {
|
||||||
|
|
Loading…
Reference in a new issue