Merge remote-tracking branch 'origin/master'
commit
c3edc23ccc
|
@ -281,6 +281,14 @@ export class BracketMatchingController extends Disposable implements editorCommo
|
|||
return;
|
||||
}
|
||||
|
||||
const selections = this._editor.getSelections();
|
||||
if (selections.length > 100) {
|
||||
// no bracket matching for high numbers of selections
|
||||
this._lastBracketsData = [];
|
||||
this._lastVersionId = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
const model = this._editor.getModel();
|
||||
const versionId = model.getVersionId();
|
||||
let previousData: BracketsData[] = [];
|
||||
|
@ -289,8 +297,6 @@ export class BracketMatchingController extends Disposable implements editorCommo
|
|||
previousData = this._lastBracketsData;
|
||||
}
|
||||
|
||||
const selections = this._editor.getSelections();
|
||||
|
||||
let positions: Position[] = [], positionsLen = 0;
|
||||
for (let i = 0, len = selections.length; i < len; i++) {
|
||||
let selection = selections[i];
|
||||
|
@ -319,6 +325,9 @@ export class BracketMatchingController extends Disposable implements editorCommo
|
|||
newData[newDataLen++] = previousData[previousIndex];
|
||||
} else {
|
||||
let brackets = model.matchBracket(position);
|
||||
if (!brackets) {
|
||||
brackets = model.findEnclosingBrackets(position);
|
||||
}
|
||||
newData[newDataLen++] = new BracketsData(position, brackets);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -363,7 +363,7 @@ export class EditorStatus extends Disposable implements IWorkbenchContribution {
|
|||
return {
|
||||
id: a.id,
|
||||
label: a.label,
|
||||
detail: Language.isDefaultVariant() ? undefined : a.alias,
|
||||
detail: (Language.isDefaultVariant() || a.label === a.alias) ? undefined : a.alias,
|
||||
run: () => {
|
||||
activeTextEditorWidget.focus();
|
||||
a.run();
|
||||
|
@ -1133,14 +1133,19 @@ export class ChangeEncodingAction extends Action {
|
|||
return this.quickInputService.pick([{ label: nls.localize('noFileEditor', "No file active at this time") }]);
|
||||
}
|
||||
|
||||
let saveWithEncodingPick: IQuickPickItem;
|
||||
let reopenWithEncodingPick: IQuickPickItem;
|
||||
if (Language.isDefaultVariant()) {
|
||||
saveWithEncodingPick = { label: nls.localize('saveWithEncoding', "Save with Encoding") };
|
||||
reopenWithEncodingPick = { label: nls.localize('reopenWithEncoding', "Reopen with Encoding") };
|
||||
} else {
|
||||
saveWithEncodingPick = { label: nls.localize('saveWithEncoding', "Save with Encoding"), detail: 'Save with Encoding', };
|
||||
reopenWithEncodingPick = { label: nls.localize('reopenWithEncoding', "Reopen with Encoding"), detail: 'Reopen with Encoding' };
|
||||
const saveWithEncodingPick: IQuickPickItem = { label: nls.localize('saveWithEncoding', "Save with Encoding") };
|
||||
const reopenWithEncodingPick: IQuickPickItem = { label: nls.localize('reopenWithEncoding', "Reopen with Encoding") };
|
||||
|
||||
if (!Language.isDefaultVariant()) {
|
||||
const saveWithEncodingAlias = 'Save with Encoding';
|
||||
if (saveWithEncodingAlias !== saveWithEncodingPick.label) {
|
||||
saveWithEncodingPick.detail = saveWithEncodingAlias;
|
||||
}
|
||||
|
||||
const reopenWithEncodingAlias = 'Reopen with Encoding';
|
||||
if (reopenWithEncodingAlias !== reopenWithEncodingPick.label) {
|
||||
reopenWithEncodingPick.detail = reopenWithEncodingAlias;
|
||||
}
|
||||
}
|
||||
|
||||
let action: IQuickPickItem;
|
||||
|
|
Loading…
Reference in New Issue