提交 0289324e 编写于 作者: B Benjamin Pasero

Merge branch 'master' into ben/editor

......@@ -141,7 +141,7 @@ const config = {
name: product.nameLong + ' document',
role: 'Editor',
ostypes: ["TEXT", "utxt", "TUTX", "****"],
extensions: ["ascx", "asp", "aspx", "bash", "bash_login", "bash_logout", "bash_profile", "bashrc", "bat", "bowerrc", "c", "cc", "clj", "cljs", "cljx", "clojure", "cmd", "code-workspace", "coffee", "config", "cpp", "cs", "cshtml", "csproj", "css", "csx", "ctp", "cxx", "dockerfile", "dot", "dtd", "editorconfig", "edn", "eyaml", "eyml", "fs", "fsi", "fsscript", "fsx", "gemspec", "gitattributes", "gitconfig", "gitignore", "go", "h", "handlebars", "hbs", "hh", "hpp", "htm", "html", "hxx", "ini", "jade", "jav", "java", "js", "jscsrc", "jshintrc", "jshtm", "json", "jsp", "less", "lua", "m", "makefile", "markdown", "md", "mdoc", "mdown", "mdtext", "mdtxt", "mdwn", "mkd", "mkdn", "ml", "mli", "php", "phtml", "pl", "pl6", "pm", "pm6", "pod", "pp", "profile", "properties", "ps1", "psd1", "psgi", "psm1", "py", "r", "rb", "rhistory", "rprofile", "rs", "rt", "scss", "sh", "shtml", "sql", "svg", "svgz", "t", "ts", "txt", "vb", "wxi", "wxl", "wxs", "xaml", "xcodeproj", "xcworkspace", "xml", "yaml", "yml", "zlogin", "zlogout", "zprofile", "zsh", "zshenv", "zshrc"],
extensions: ["ascx", "asp", "aspx", "bash", "bash_login", "bash_logout", "bash_profile", "bashrc", "bat", "bowerrc", "c", "cc", "clj", "cljs", "cljx", "clojure", "cmd", "code-workspace", "coffee", "config", "cpp", "cs", "cshtml", "csproj", "css", "csx", "ctp", "cxx", "dockerfile", "dot", "dtd", "editorconfig", "edn", "eyaml", "eyml", "fs", "fsi", "fsscript", "fsx", "gemspec", "gitattributes", "gitconfig", "gitignore", "go", "h", "handlebars", "hbs", "hh", "hpp", "htm", "html", "hxx", "ini", "jade", "jav", "java", "js", "jscsrc", "jshintrc", "jshtm", "json", "jsp", "less", "lua", "m", "makefile", "markdown", "md", "mdoc", "mdown", "mdtext", "mdtxt", "mdwn", "mkd", "mkdn", "ml", "mli", "php", "phtml", "pl", "pl6", "pm", "pm6", "pod", "pp", "profile", "properties", "ps1", "psd1", "psgi", "psm1", "pug", "py", "r", "rb", "rhistory", "rprofile", "rs", "rt", "scss", "sh", "shtml", "sql", "svg", "svgz", "t", "ts", "txt", "vb", "wxi", "wxl", "wxs", "xaml", "xcodeproj", "xcworkspace", "xml", "yaml", "yml", "zlogin", "zlogout", "zprofile", "zsh", "zshenv", "zshrc"],
iconFile: 'resources/darwin/code_file.icns'
}],
darwinBundleURLTypes: [{
......
......@@ -83,7 +83,7 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar, version = 'mas
grammar = plist.parse(content);
} else if (ext === '.cson') {
grammar = cson.parse(content);
} else if (ext === '.json') {
} else if (ext === '.json' || ext === '.JSON-tmLanguage') {
grammar = JSON.parse(content);
} else {
return Promise.reject(new Error('Unknown file extension: ' + ext));
......
......@@ -57,7 +57,7 @@
"meta.embedded.block.dockerfile": "dockerfile",
"meta.embedded.block.go": "go",
"meta.embedded.block.groovy": "groovy",
"meta.embedded.block.jade": "jade",
"meta.embedded.block.pug": "jade",
"meta.embedded.block.javascript": "javascript",
"meta.embedded.block.json": "json",
"meta.embedded.block.less": "less",
......
......@@ -109,7 +109,7 @@
"include": "#fenced_code_block_groovy"
},
{
"include": "#fenced_code_block_jade"
"include": "#fenced_code_block_pug"
},
{
"include": "#fenced_code_block_js"
......@@ -1058,7 +1058,7 @@
}
]
},
"fenced_code_block_jade": {
"fenced_code_block_pug": {
"begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jade|pug)(\\s+[^`~]*)?$)",
"name": "markup.fenced_code.block.markdown",
"end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
......@@ -1082,10 +1082,10 @@
{
"begin": "(^|\\G)(\\s*)(.*)",
"while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
"contentName": "meta.embedded.block.jade",
"contentName": "meta.embedded.block.pug",
"patterns": [
{
"include": "text.jade"
"include": "text.pug"
}
]
}
......
......@@ -288,6 +288,9 @@ export class PackageJSONContribution implements IJSONContribution {
if (latest) {
result.push(localize('json.npm.version.hover', 'Latest version: {0}', latest));
}
if (obj.homepage) {
result.push(obj.homepage);
}
return result;
}
} catch (e) {
......
// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS:
[{
"name": "davidrios/jade-tmbundle",
"name": "davidrios/pug-tmbundle",
"version": "0.0.0",
"license": "MIT",
"repositoryURL": "https://github.com/davidrios/jade-tmbundle",
"description": "The file syntaxes/Jade.json was derived from Jade.tmLanguage in https://github.com/davidrios/jade-tmbundle.",
"licenseDetail": [
"The MIT License (MIT)",
"",
"Copyright (c) 2014 David Rios",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated ",
"documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to ",
"use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to ",
"whom the Software is furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ",
"OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ",
"LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ",
"CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE"
]
"repositoryURL": "https://github.com/davidrios/pug-tmbundle",
"description": "The file syntaxes/pug.tmLanguage.json was derived from Syntaxes/Pug.JSON-tmLanguage in https://github.com/davidrios/pug-tmbundle."
}]
......@@ -6,7 +6,7 @@
"publisher": "vscode",
"engines": { "vscode": "*" },
"scripts": {
"update-grammar": "node ../../build/npm/update-grammar.js davidrios/jade-tmbundle Syntaxes/Jade.tmLanguage ./syntaxes/pug.tmLanguage.json"
"update-grammar": "node ../../build/npm/update-grammar.js davidrios/pug-tmbundle Syntaxes/Pug.JSON-tmLanguage ./syntaxes/pug.tmLanguage.json"
},
"contributes": {
"languages": [{
......@@ -17,7 +17,7 @@
}],
"grammars": [{
"language": "jade",
"scopeName": "text.jade",
"scopeName": "text.pug",
"path": "./syntaxes/pug.tmLanguage.json"
}]
}
......
[
{
"c": ".ssdsd",
"t": "text.jade entity.other.attribute-name.class.jade",
"t": "text.pug entity.other.attribute-name.class.pug",
"r": {
"dark_plus": "entity.other.attribute-name: #9CDCFE",
"light_plus": "entity.other.attribute-name: #FF0000",
......@@ -12,12 +12,12 @@
},
{
"c": " // asdsdas",
"t": "text.jade string.comment.buffered.block.jade",
"t": "text.pug string.comment.buffered.block.pug",
"r": {
"dark_plus": "string: #CE9178",
"light_plus": "string.comment.buffered.block.jade: #0000FF",
"light_plus": "string.comment.buffered.block.pug: #0000FF",
"dark_vs": "string: #CE9178",
"light_vs": "string.comment.buffered.block.jade: #0000FF",
"light_vs": "string.comment.buffered.block.pug: #0000FF",
"hc_black": "string: #CE9178"
}
}
......
......@@ -216,9 +216,9 @@
},
{
"scope": [
"string.comment.buffered.block.jade",
"string.quoted.jade",
"string.interpolated.jade",
"string.comment.buffered.block.pug",
"string.quoted.pug",
"string.interpolated.pug",
"string.unquoted.plain.in.yaml",
"string.unquoted.plain.out.yaml",
"string.unquoted.block.yaml",
......
......@@ -205,6 +205,7 @@ export function serve(hook: any): TPromise<Server> {
});
}
export function connect(options: { host: string, port: number }, clientId: string): TPromise<Client>;
export function connect(port: number, clientId: string): TPromise<Client>;
export function connect(namedPipe: string, clientId: string): TPromise<Client>;
export function connect(hook: any, clientId: string): TPromise<Client> {
......
......@@ -9,7 +9,7 @@ import * as nls from 'vs/nls';
import { isMacintosh, isLinux, isWindows, language } from 'vs/base/common/platform';
import * as arrays from 'vs/base/common/arrays';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { ipcMain as ipc, app, shell, Menu, MenuItem, BrowserWindow } from 'electron';
import { app, shell, Menu, MenuItem, BrowserWindow } from 'electron';
import { OpenContext, IRunActionInWindowRequest, IWindowsService } from 'vs/platform/windows/common/windows';
import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration';
import { AutoSaveConfiguration } from 'vs/platform/files/common/files';
......@@ -24,11 +24,6 @@ import { IWindowsMainService, IWindowsCountChangedEvent } from 'vs/platform/wind
import { IHistoryMainService } from 'vs/platform/history/common/history';
import { IWorkspaceIdentifier, getWorkspaceLabel, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
interface IExtensionViewlet {
id: string;
label: string;
}
interface IMenuItemClickHandler {
inDevTools: (contents: Electron.WebContents) => void;
inNoWindow: () => void;
......@@ -57,8 +52,6 @@ export class CodeMenu {
private keybindingsResolver: KeybindingsResolver;
private extensionViewlets: IExtensionViewlet[];
private closeFolder: Electron.MenuItem;
private closeWorkspace: Electron.MenuItem;
......@@ -74,7 +67,6 @@ export class CodeMenu {
@ITelemetryService private telemetryService: ITelemetryService,
@IHistoryMainService private historyMainService: IHistoryMainService
) {
this.extensionViewlets = [];
this.nativeTabMenuItems = [];
this.menuUpdater = new RunOnceScheduler(() => this.doUpdateMenu(), 0);
......@@ -99,21 +91,6 @@ export class CodeMenu {
this.windowsMainService.onWindowReady(() => this.updateWorkspaceMenuItems());
this.windowsMainService.onWindowClose(() => this.updateWorkspaceMenuItems());
// Listen to extension viewlets
ipc.on('vscode:extensionViewlets', (event: any, rawExtensionViewlets: string) => {
let extensionViewlets: IExtensionViewlet[] = [];
try {
extensionViewlets = JSON.parse(rawExtensionViewlets);
} catch (error) {
// Should not happen
}
if (extensionViewlets.length) {
this.extensionViewlets = extensionViewlets;
this.updateMenu();
}
});
// Update when auto save config changes
this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated(e));
......@@ -671,21 +648,8 @@ export class CodeMenu {
const debugConsole = this.createMenuItem(nls.localize({ key: 'miToggleDebugConsole', comment: ['&& denotes a mnemonic'] }, "De&&bug Console"), 'workbench.debug.action.toggleRepl');
const integratedTerminal = this.createMenuItem(nls.localize({ key: 'miToggleIntegratedTerminal', comment: ['&& denotes a mnemonic'] }, "&&Integrated Terminal"), 'workbench.action.terminal.toggleTerminal');
const problems = this.createMenuItem(nls.localize({ key: 'miMarker', comment: ['&& denotes a mnemonic'] }, "&&Problems"), 'workbench.actions.view.problems');
let additionalViewlets: Electron.MenuItem;
if (this.extensionViewlets.length) {
const additionalViewletsMenu = new Menu();
this.extensionViewlets.forEach(viewlet => {
additionalViewletsMenu.append(this.createMenuItem(viewlet.label, viewlet.id));
});
additionalViewlets = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miAdditionalViews', comment: ['&& denotes a mnemonic'] }, "Additional &&Views")), submenu: additionalViewletsMenu, enabled: true });
}
const commands = this.createMenuItem(nls.localize({ key: 'miCommandPalette', comment: ['&& denotes a mnemonic'] }, "&&Command Palette..."), 'workbench.action.showCommands');
const openView = this.createMenuItem(nls.localize({ key: 'miOpenView', comment: ['&& denotes a mnemonic'] }, "&&Open View..."), 'workbench.action.openView');
const fullscreen = new MenuItem(this.withKeybinding('workbench.action.toggleFullScreen', { label: this.mnemonicLabel(nls.localize({ key: 'miToggleFullScreen', comment: ['&& denotes a mnemonic'] }, "Toggle &&Full Screen")), click: () => this.windowsMainService.getLastActiveWindow().toggleFullScreen(), enabled: this.windowsMainService.getWindowCount() > 0 }));
const toggleZenMode = this.createMenuItem(nls.localize('miToggleZenMode', "Toggle Zen Mode"), 'workbench.action.toggleZenMode');
const toggleCenteredLayout = this.createMenuItem(nls.localize('miToggleCenteredLayout', "Toggle Centered Layout"), 'workbench.action.toggleCenteredLayout');
......@@ -739,7 +703,6 @@ export class CodeMenu {
scm,
debug,
extensions,
additionalViewlets,
__separator__(),
output,
problems,
......
......@@ -185,23 +185,6 @@ export class TextModelSearch {
}
if (searchData.regex.multiline) {
if (searchData.regex.source === '\\n') {
// Fast path for searching for EOL
let result: FindMatch[] = [], resultLen = 0;
for (let lineNumber = 1, lineCount = model.getLineCount(); lineNumber < lineCount; lineNumber++) {
const range = new Range(lineNumber, model.getLineMaxColumn(lineNumber), lineNumber + 1, 1);
if (captureMatches) {
result[resultLen++] = new FindMatch(range, null);
} else {
result[resultLen++] = new FindMatch(range, ['\n']);
}
if (resultLen >= limitResultCount) {
break;
}
}
return result;
}
return this._doFindMatchesMultiline(model, searchRange, new Searcher(searchData.wordSeparators, searchData.regex), captureMatches, limitResultCount);
}
return this._doFindMatchesLineByLine(model, searchRange, searchData, captureMatches, limitResultCount);
......
......@@ -34,8 +34,8 @@ export const vs: IStandaloneThemeData = {
{ token: 'delimiter.xml', foreground: '0000FF' },
{ token: 'tag', foreground: '800000' },
{ token: 'tag.id.jade', foreground: '4F76AC' },
{ token: 'tag.class.jade', foreground: '4F76AC' },
{ token: 'tag.id.pug', foreground: '4F76AC' },
{ token: 'tag.class.pug', foreground: '4F76AC' },
{ token: 'meta.scss', foreground: '800000' },
{ token: 'metatag', foreground: 'e00000' },
{ token: 'metatag.content.html', foreground: 'FF0000' },
......@@ -107,8 +107,8 @@ export const vs_dark: IStandaloneThemeData = {
{ token: 'delimiter.xml', foreground: '808080' },
{ token: 'tag', foreground: '569CD6' },
{ token: 'tag.id.jade', foreground: '4F76AC' },
{ token: 'tag.class.jade', foreground: '4F76AC' },
{ token: 'tag.id.pug', foreground: '4F76AC' },
{ token: 'tag.class.pug', foreground: '4F76AC' },
{ token: 'meta.scss', foreground: 'A79873' },
{ token: 'meta.tag', foreground: 'CE9178' },
{ token: 'metatag', foreground: 'DD6A6F' },
......@@ -176,8 +176,8 @@ export const hc_black: IStandaloneThemeData = {
{ token: 'delimiter.html', foreground: 'FFFF00' },
{ token: 'tag', foreground: '569CD6' },
{ token: 'tag.id.jade', foreground: '4F76AC' },
{ token: 'tag.class.jade', foreground: '4F76AC' },
{ token: 'tag.id.pug', foreground: '4F76AC' },
{ token: 'tag.class.pug', foreground: '4F76AC' },
{ token: 'meta', foreground: 'D4D4D4' },
{ token: 'meta.tag', foreground: 'CE9178' },
{ token: 'metatag', foreground: '569CD6' },
......
......@@ -546,7 +546,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
private checkForDependenciesAndUninstall(extension: ILocalExtension, installed: ILocalExtension[], force: boolean): TPromise<void> {
return this.preUninstallExtension(extension)
.then(() => this.hasDependencies(extension, installed) ? this.promptForDependenciesAndUninstall(extension, installed, force) : this.promptAndUninstall(extension, installed, force))
.then(() => this.hasDependencies(extension, installed) ? this.promptForDependenciesAndUninstall(extension, installed, force) : this.uninstallWithDependencies(extension, [], installed))
.then(() => this.postUninstallExtension(extension),
error => {
this.postUninstallExtension(extension, new ExtensionManagementError(error instanceof Error ? error.message : error, INSTALL_ERROR_LOCAL));
......@@ -588,27 +588,6 @@ export class ExtensionManagementService extends Disposable implements IExtension
}, error => TPromise.wrapError(errors.canceled()));
}
private promptAndUninstall(extension: ILocalExtension, installed: ILocalExtension[], force: boolean): TPromise<void> {
if (force) {
return this.uninstallWithDependencies(extension, [], installed);
}
const message = nls.localize('uninstallConfirmation', "Are you sure you want to uninstall '{0}'?", extension.manifest.displayName || extension.manifest.name);
const buttons = [
nls.localize('ok', "OK"),
nls.localize('cancel', "Cancel")
];
this.logService.info('Requesting for confirmation to uninstall extension', extension.identifier.id);
return this.dialogService.show(Severity.Info, message, buttons, { cancelId: 1 })
.then<void>(value => {
if (value === 0) {
return this.uninstallWithDependencies(extension, [], installed);
}
this.logService.info('Cancelled uninstalling extension:', extension.identifier.id);
return TPromise.wrapError(errors.canceled());
}, error => TPromise.wrapError(errors.canceled()));
}
private uninstallWithDependencies(extension: ILocalExtension, dependencies: ILocalExtension[], installed: ILocalExtension[]): TPromise<void> {
const dependenciesToUninstall = this.filterDependents(extension, dependencies, installed);
let dependents = this.getDependents(extension, installed).filter(dependent => extension !== dependent && dependenciesToUninstall.indexOf(dependent) === -1);
......
......@@ -121,7 +121,7 @@ export class CompositeBar extends Widget implements ICompositeBar {
public addComposite({ id, name, order }: { id: string; name: string, order: number }, open: boolean): void {
const state = this.storedState.filter(s => s.id === id)[0];
const pinned = state ? state.pinned : true;
let index = this.model.items.length;
let index = order >= 0 ? order : this.model.items.length;
if (state) {
// Find the index by looking its previous item
......@@ -137,9 +137,10 @@ export class CompositeBar extends Widget implements ICompositeBar {
}
// Add to the model
if (this.addToModel(id, name, order, pinned, index)) {
if (open) {
this.pin(id, true);
if (this.model.add(id, name, order, index)) {
this.computeSizes([this.model.findItem(id)]);
if (pinned || open) {
this.pin(id, open);
} else {
this.updateCompositeSwitcher();
}
......@@ -259,14 +260,6 @@ export class CompositeBar extends Widget implements ICompositeBar {
return item && item.activityAction;
}
private addToModel(id: string, name: string, order: number, pinned: boolean, index: number): boolean {
if (this.model.add(id, name, order, pinned, index)) {
this.computeSizes([this.model.findItem(id)]);
return true;
}
return false;
}
private computeSizes(items: ICompositeBarItem[]): void {
const size = this.options.compositeSize;
if (size) {
......@@ -482,7 +475,7 @@ class CompositeBarModel {
};
}
add(id: string, name: string, order: number, pinned: boolean, index: number): boolean {
add(id: string, name: string, order: number, index: number): boolean {
const item = this.findItem(id);
if (item) {
item.order = order;
......@@ -495,7 +488,7 @@ class CompositeBarModel {
index++;
}
}
this.items.splice(index, 0, this.createCompositeBarItem(id, name, order, pinned));
this.items.splice(index, 0, this.createCompositeBarItem(id, name, order, false));
return true;
}
}
......
......@@ -27,7 +27,6 @@ import { ITitleService } from 'vs/workbench/services/title/common/titleService';
import { IWorkbenchThemeService, VS_HC_THEME, VS_DARK_THEME } from 'vs/workbench/services/themes/common/workbenchThemeService';
import * as browser from 'vs/base/browser/browser';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
import { IResourceInput } from 'vs/platform/editor/common/editor';
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
import { KeyboardMapperFactory } from 'vs/workbench/services/keybinding/electron-browser/keybindingService';
......@@ -84,7 +83,6 @@ export class ElectronWindow extends Themable {
@INotificationService private notificationService: INotificationService,
@ICommandService private commandService: ICommandService,
@IExtensionService private extensionService: IExtensionService,
@IViewletService private viewletService: IViewletService,
@IContextMenuService private contextMenuService: IContextMenuService,
@IKeybindingService private keybindingService: IKeybindingService,
@ITelemetryService private telemetryService: ITelemetryService,
......@@ -305,11 +303,6 @@ export class ElectronWindow extends Themable {
return null;
};
// Send over all extension viewlets when extensions are ready
this.extensionService.whenInstalledExtensionsRegistered().then(() => {
ipc.send('vscode:extensionViewlets', JSON.stringify(this.viewletService.getViewlets().map(v => { return { id: v.id, label: v.name }; })));
});
// Emit event when vscode has loaded
this.lifecycleService.when(LifecyclePhase.Running).then(() => {
ipc.send('vscode:workbenchLoaded', this.windowService.getCurrentWindowId());
......
......@@ -186,7 +186,7 @@
width: 8px;
position: absolute;
bottom: 16px;
left: 590px;
right: 202px;
}
.settings-editor > .settings-body > .settings-list-container .monaco-list-row .setting-item-value {
......
......@@ -1193,7 +1193,7 @@ export class SCMViewlet extends PanelViewlet implements IViewModel, IViewsViewle
const start = this.getContributedViewsStartIndex();
for (let i = 0; i < this.contributedViews.viewDescriptors.length; i++) {
for (let i = 0; i < this.contributedViews.visibleViewDescriptors.length; i++) {
const panel = this.panels[start + i] as ViewsViewletPanel;
promises.push(panel.setVisible(visible));
}
......
......@@ -15,19 +15,19 @@ import { IWorkspaceFolder } from 'vs/platform/workspace/common/workspace';
export enum ShellQuoting {
/**
* Default is character escaping.
* Use character escaping.
*/
Escape = 1,
/**
* Default is strong quoting
* Use strong quoting
*/
Strong = 2,
/**
* Default is weak quoting.
* Use weak quoting.
*/
Weak = 3
Weak = 3,
}
export namespace ShellQuoting {
......
......@@ -649,8 +649,21 @@ export class TerminalTaskSystem implements ITaskSystem {
return false;
}
}
let quote: string;
for (let i = 0; i < value.length; i++) {
if (value[i] === ' ' && value[i - 1] !== shellQuoteOptions.escape) {
// We found the end quote.
let ch = value[i];
if (ch === quote) {
quote = undefined;
} else if (quote !== void 0) {
// skip the character. We are quoted.
continue;
} else if (ch === shellQuoteOptions.escape) {
// Skip the next character
i++;
} else if (ch === shellQuoteOptions.strong || ch === shellQuoteOptions.weak) {
quote = ch;
} else if (ch === ' ') {
return true;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册