mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Enable tslint number-literal-format
This commit is contained in:
parent
a131278f4a
commit
873fc8fc38
|
@ -98,7 +98,7 @@ export function activate(context: vscode.ExtensionContext) {
|
|||
}));
|
||||
|
||||
context.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.incrementNumberByOneTenth', () => {
|
||||
return incrementDecrement(.1);
|
||||
return incrementDecrement(0.1);
|
||||
}));
|
||||
|
||||
context.subscriptions.push(vscode.commands.registerCommand('editor.emmet.action.incrementNumberByOne', () => {
|
||||
|
|
|
@ -388,7 +388,7 @@ export class Color {
|
|||
const colorA = rgba.a;
|
||||
|
||||
let a = thisA + colorA * (1 - thisA);
|
||||
if (a < 1.0e-6) {
|
||||
if (a < 1e-6) {
|
||||
return Color.transparent;
|
||||
}
|
||||
|
||||
|
|
|
@ -414,7 +414,7 @@ class LeakageMonitor {
|
|||
if (this._warnCountdown <= 0) {
|
||||
// only warn on first exceed and then every time the limit
|
||||
// is exceeded by 50% again
|
||||
this._warnCountdown = threshold * .5;
|
||||
this._warnCountdown = threshold * 0.5;
|
||||
|
||||
// find most frequent listener and print warning
|
||||
let topStack: string;
|
||||
|
|
|
@ -344,7 +344,7 @@ export function createScanner(text: string, ignoreTrivia: boolean = false): JSON
|
|||
start = pos;
|
||||
continue;
|
||||
}
|
||||
if (ch >= 0 && ch <= 0x1f) {
|
||||
if (ch >= 0 && ch <= 0x1F) {
|
||||
if (isLineBreak(ch)) {
|
||||
result += text.substring(start, pos);
|
||||
scanError = ScanError.UnexpectedEndOfString;
|
||||
|
@ -668,7 +668,7 @@ const enum CharacterCodes {
|
|||
W = 0x57,
|
||||
X = 0x58,
|
||||
Y = 0x59,
|
||||
Z = 0x5a,
|
||||
Z = 0x5A,
|
||||
|
||||
ampersand = 0x26, // &
|
||||
asterisk = 0x2A, // *
|
||||
|
|
|
@ -395,7 +395,7 @@ const enum BinaryKeybindingsMask {
|
|||
Shift = (1 << 10) >>> 0,
|
||||
Alt = (1 << 9) >>> 0,
|
||||
WinCtrl = (1 << 8) >>> 0,
|
||||
KeyCode = 0x000000ff
|
||||
KeyCode = 0x000000FF
|
||||
}
|
||||
|
||||
export const enum KeyMod {
|
||||
|
@ -406,7 +406,7 @@ export const enum KeyMod {
|
|||
}
|
||||
|
||||
export function KeyChord(firstPart: number, secondPart: number): number {
|
||||
let chordPart = ((secondPart & 0x0000ffff) << 16) >>> 0;
|
||||
let chordPart = ((secondPart & 0x0000FFFF) << 16) >>> 0;
|
||||
return (firstPart | chordPart) >>> 0;
|
||||
}
|
||||
|
||||
|
@ -414,8 +414,8 @@ export function createKeybinding(keybinding: number, OS: OperatingSystem): Keybi
|
|||
if (keybinding === 0) {
|
||||
return null;
|
||||
}
|
||||
const firstPart = (keybinding & 0x0000ffff) >>> 0;
|
||||
const chordPart = (keybinding & 0xffff0000) >>> 16;
|
||||
const firstPart = (keybinding & 0x0000FFFF) >>> 0;
|
||||
const chordPart = (keybinding & 0xFFFF0000) >>> 16;
|
||||
if (chordPart !== 0) {
|
||||
return new ChordKeybinding(
|
||||
createSimpleKeybinding(firstPart, OS),
|
||||
|
|
|
@ -772,7 +772,7 @@ export class QuickOpenWidget extends Disposable implements IModelProvider {
|
|||
|
||||
let preferredItemsHeight: number;
|
||||
if (this.layoutDimensions && this.layoutDimensions.height) {
|
||||
preferredItemsHeight = (this.layoutDimensions.height - 50 /* subtract height of input field (30px) and some spacing (drop shadow) to fit */) * 0.40 /* max 40% of screen */;
|
||||
preferredItemsHeight = (this.layoutDimensions.height - 50 /* subtract height of input field (30px) and some spacing (drop shadow) to fit */) * 0.4 /* max 40% of screen */;
|
||||
}
|
||||
|
||||
if (!preferredItemsHeight || preferredItemsHeight > QuickOpenWidget.MAX_ITEMS_HEIGHT) {
|
||||
|
|
|
@ -186,7 +186,7 @@ suite('Color', () => {
|
|||
});
|
||||
|
||||
test('bug#36240', () => {
|
||||
assert.deepEqual(HSVA.fromRGBA(new RGBA(92, 106, 196, 1)), new HSVA(232, .531, .769, 1));
|
||||
assert.deepEqual(HSVA.fromRGBA(new RGBA(92, 106, 196, 1)), new HSVA(232, 0.531, 0.769, 1));
|
||||
assert.deepEqual(HSVA.toRGBA(HSVA.fromRGBA(new RGBA(92, 106, 196, 1))), new RGBA(92, 106, 196, 1));
|
||||
});
|
||||
});
|
||||
|
|
|
@ -17,7 +17,7 @@ suite('Hash', () => {
|
|||
});
|
||||
|
||||
test('number', () => {
|
||||
assert.equal(hash(1), hash(1.0));
|
||||
assert.equal(hash(1), hash(1));
|
||||
assert.notEqual(hash(0), hash(1));
|
||||
assert.notEqual(hash(1), hash(-1));
|
||||
assert.notEqual(hash(0x12345678), hash(0x123456789));
|
||||
|
|
|
@ -1041,7 +1041,7 @@ export class PieceTreeBase {
|
|||
while (text.length > AverageBufferSize) {
|
||||
const lastChar = text.charCodeAt(AverageBufferSize - 1);
|
||||
let splitText;
|
||||
if (lastChar === CharCode.CarriageReturn || (lastChar >= 0xd800 && lastChar <= 0xdbff)) {
|
||||
if (lastChar === CharCode.CarriageReturn || (lastChar >= 0xD800 && lastChar <= 0xDBFF)) {
|
||||
// last character is \r or a high surrogate => keep it back
|
||||
splitText = text.substring(0, AverageBufferSize - 1);
|
||||
text = text.substring(AverageBufferSize - 1);
|
||||
|
|
|
@ -103,7 +103,7 @@ export class PieceTreeTextBufferBuilder implements ITextBufferBuilder {
|
|||
}
|
||||
|
||||
const lastChar = chunk.charCodeAt(chunk.length - 1);
|
||||
if (lastChar === CharCode.CarriageReturn || (lastChar >= 0xd800 && lastChar <= 0xdbff)) {
|
||||
if (lastChar === CharCode.CarriageReturn || (lastChar >= 0xD800 && lastChar <= 0xDBFF)) {
|
||||
// last character is \r or a high surrogate => keep it back
|
||||
this._acceptChunk1(chunk.substr(0, chunk.length - 1), false);
|
||||
this._hasPreviousChar = true;
|
||||
|
|
|
@ -735,7 +735,7 @@ function _renderLine(input: ResolvedRenderLineInput, sb: IStringBuilder): Render
|
|||
if (!canUseHalfwidthRightwardsArrow || insertSpacesCount > 1) {
|
||||
sb.write1(0x2192); // RIGHTWARDS ARROW
|
||||
} else {
|
||||
sb.write1(0xffeb); // HALFWIDTH RIGHTWARDS ARROW
|
||||
sb.write1(0xFFEB); // HALFWIDTH RIGHTWARDS ARROW
|
||||
}
|
||||
insertSpacesCount--;
|
||||
}
|
||||
|
@ -745,7 +745,7 @@ function _renderLine(input: ResolvedRenderLineInput, sb: IStringBuilder): Render
|
|||
}
|
||||
} else {
|
||||
// must be CharCode.Space
|
||||
sb.write1(0xb7); // ·
|
||||
sb.write1(0xB7); // ·
|
||||
}
|
||||
|
||||
charOffsetInPart++;
|
||||
|
@ -805,7 +805,7 @@ function _renderLine(input: ResolvedRenderLineInput, sb: IStringBuilder): Render
|
|||
|
||||
case CharCode.UTF8_BOM:
|
||||
case CharCode.LINE_SEPARATOR_2028:
|
||||
sb.write1(0xfffd);
|
||||
sb.write1(0xFFFD);
|
||||
partContentCnt++;
|
||||
break;
|
||||
|
||||
|
|
|
@ -83,8 +83,8 @@ class CodeLensContentWidget implements editorBrowser.IContentWidget {
|
|||
const { fontInfo, lineHeight } = this._editor.getConfiguration();
|
||||
this._domNode.style.height = `${Math.round(lineHeight * 1.1)}px`;
|
||||
this._domNode.style.lineHeight = `${lineHeight}px`;
|
||||
this._domNode.style.fontSize = `${Math.round(fontInfo.fontSize * .9)}px`;
|
||||
this._domNode.style.paddingRight = `${Math.round(fontInfo.fontSize * .45)}px`;
|
||||
this._domNode.style.fontSize = `${Math.round(fontInfo.fontSize * 0.9)}px`;
|
||||
this._domNode.style.paddingRight = `${Math.round(fontInfo.fontSize * 0.45)}px`;
|
||||
this._domNode.innerHTML = ' ';
|
||||
}
|
||||
|
||||
|
|
|
@ -224,7 +224,7 @@ export class OutlineGroup extends TreeElement {
|
|||
|
||||
export class OutlineModel extends TreeElement {
|
||||
|
||||
private static readonly _requests = new LRUCache<string, { promiseCnt: number, source: CancellationTokenSource, promise: Promise<any>, model: OutlineModel }>(9, .75);
|
||||
private static readonly _requests = new LRUCache<string, { promiseCnt: number, source: CancellationTokenSource, promise: Promise<any>, model: OutlineModel }>(9, 0.75);
|
||||
private static readonly _keys = new class {
|
||||
|
||||
private _counter = 1;
|
||||
|
|
|
@ -115,7 +115,7 @@ class MessageWidget {
|
|||
|
||||
dom.clearNode(this._relatedBlock);
|
||||
if (isNonEmptyArray(relatedInformation)) {
|
||||
this._relatedBlock.style.paddingTop = `${Math.floor(this._editor.getConfiguration().lineHeight * .66)}px`;
|
||||
this._relatedBlock.style.paddingTop = `${Math.floor(this._editor.getConfiguration().lineHeight * 0.66)}px`;
|
||||
this._lines += 1;
|
||||
|
||||
for (const related of relatedInformation) {
|
||||
|
|
|
@ -332,7 +332,7 @@ export class ReferenceWidget extends PeekViewWidget {
|
|||
this._previewNotAvailableMessage = TextModel.createFromString(nls.localize('missingPreviewMessage', "no preview available"));
|
||||
|
||||
// sash
|
||||
this._sash = new VSash(containerElement, this.layoutData.ratio || .8);
|
||||
this._sash = new VSash(containerElement, this.layoutData.ratio || 0.8);
|
||||
this._sash.onDidChangePercentages(() => {
|
||||
let [left, right] = this._sash.percentages;
|
||||
this._previewContainer.style.width = left;
|
||||
|
|
|
@ -67,7 +67,7 @@ export interface MemItem {
|
|||
|
||||
export class LRUMemory extends Memory {
|
||||
|
||||
private _cache = new LRUCache<string, MemItem>(300, .66);
|
||||
private _cache = new LRUCache<string, MemItem>(300, 0.66);
|
||||
private _seq = 0;
|
||||
|
||||
memorize(model: ITextModel, pos: IPosition, item: CompletionItem): void {
|
||||
|
|
|
@ -364,7 +364,7 @@ export abstract class ZoneWidget implements IHorizontalSashLayoutProvider {
|
|||
const lineHeight = this.editor.getConfiguration().lineHeight;
|
||||
|
||||
// adjust heightInLines to viewport
|
||||
const maxHeightInLines = (this.editor.getLayoutInfo().height / lineHeight) * .8;
|
||||
const maxHeightInLines = (this.editor.getLayoutInfo().height / lineHeight) * 0.8;
|
||||
if (heightInLines >= maxHeightInLines) {
|
||||
heightInLines = maxHeightInLines;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ export class BenchmarkSuite {
|
|||
for (const benchmark of this.benchmarks) {
|
||||
let columns: string[] = [benchmark.name];
|
||||
[new PieceTreeTextBufferBuilder()].forEach((builder: ITextBufferBuilder) => {
|
||||
let timeDiffTotal = 0.0;
|
||||
let timeDiffTotal = 0;
|
||||
for (let j = 0; j < this.iterations; j++) {
|
||||
let factory = benchmark.buildBuffer(builder);
|
||||
let buffer = factory.create(DefaultEndOfLine.LF);
|
||||
|
|
|
@ -50,7 +50,7 @@ export function generateRandomEdits(chunks: string[], editCnt: number): IIdentif
|
|||
let startColumn = getRandomInt(1, Math.max(lines[line - 1].length, 1));
|
||||
let endColumn = getRandomInt(startColumn, Math.max(lines[line - 1].length, startColumn));
|
||||
let text: string = '';
|
||||
if (Math.random() < .5) {
|
||||
if (Math.random() < 0.5) {
|
||||
text = getRandomString(5, 10);
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ export function generateSequentialInserts(chunks: string[], editCnt: number): II
|
|||
let line = lines.length;
|
||||
let column = lines[line - 1].length + 1;
|
||||
let text: string = '';
|
||||
if (Math.random() < .5) {
|
||||
if (Math.random() < 0.5) {
|
||||
text = '\n';
|
||||
lines.push('');
|
||||
} else {
|
||||
|
|
|
@ -28,18 +28,18 @@ suite('MinimapCharRenderer', () => {
|
|||
});
|
||||
|
||||
const sampleD = [
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xd0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xd0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xd0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x0d, 0xff, 0xff, 0xff, 0xa3, 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xe5, 0xff, 0xff, 0xff, 0x5e, 0xff, 0xff, 0xff, 0xd0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xa4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x10, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x94, 0xff, 0xff, 0xff, 0x02, 0xff, 0xff, 0xff, 0x6a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x22, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x47, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xd6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x31, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x0e, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x69, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x9b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xb9, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x0e, 0xff, 0xff, 0xff, 0xa7, 0xff, 0xff, 0xff, 0xf5, 0xff, 0xff, 0xff, 0xe8, 0xff, 0xff, 0xff, 0x71, 0xff, 0xff, 0xff, 0xd0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x0D, 0xFF, 0xFF, 0xFF, 0xA3, 0xFF, 0xFF, 0xFF, 0xF3, 0xFF, 0xFF, 0xFF, 0xE5, 0xFF, 0xFF, 0xFF, 0x5E, 0xFF, 0xFF, 0xFF, 0xD0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x78, 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0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
@ -94,10 +94,10 @@ suite('MinimapCharRenderer', () => {
|
|||
actual[i] = imageData.data[i];
|
||||
}
|
||||
assert.deepEqual(actual, [
|
||||
0x00, 0x00, 0x00, 0xff, 0x6d, 0x6d, 0x6d, 0xff,
|
||||
0xbb, 0xbb, 0xbb, 0xff, 0xbe, 0xbe, 0xbe, 0xff,
|
||||
0x94, 0x94, 0x94, 0xff, 0x7e, 0x7e, 0x7e, 0xff,
|
||||
0xb1, 0xb1, 0xb1, 0xff, 0xbb, 0xbb, 0xbb, 0xff,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x6D, 0x6D, 0x6D, 0xFF,
|
||||
0xBB, 0xBB, 0xBB, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF,
|
||||
0x94, 0x94, 0x94, 0xFF, 0x7E, 0x7E, 0x7E, 0xFF,
|
||||
0xB1, 0xB1, 0xB1, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF,
|
||||
]);
|
||||
});
|
||||
|
||||
|
@ -122,10 +122,10 @@ suite('MinimapCharRenderer', () => {
|
|||
actual[i] = imageData.data[i];
|
||||
}
|
||||
assert.deepEqual(actual, [
|
||||
0x00, 0x00, 0x00, 0xff, 0x6d, 0x6d, 0x6d, 0xff,
|
||||
0xbb, 0xbb, 0xbb, 0xff, 0xbe, 0xbe, 0xbe, 0xff,
|
||||
0x94, 0x94, 0x94, 0xff, 0x7e, 0x7e, 0x7e, 0xff,
|
||||
0xb1, 0xb1, 0xb1, 0xff, 0xbb, 0xbb, 0xbb, 0xff,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x6D, 0x6D, 0x6D, 0xFF,
|
||||
0xBB, 0xBB, 0xBB, 0xFF, 0xBE, 0xBE, 0xBE, 0xFF,
|
||||
0x94, 0x94, 0x94, 0xFF, 0x7E, 0x7E, 0x7E, 0xFF,
|
||||
0xB1, 0xB1, 0xB1, 0xFF, 0xBB, 0xBB, 0xBB, 0xFF,
|
||||
]);
|
||||
});
|
||||
|
||||
|
@ -151,8 +151,8 @@ suite('MinimapCharRenderer', () => {
|
|||
actual[i] = imageData.data[i];
|
||||
}
|
||||
assert.deepEqual(actual, [
|
||||
0x55, 0x55, 0x55, 0xff,
|
||||
0x93, 0x93, 0x93, 0xff,
|
||||
0x55, 0x55, 0x55, 0xFF,
|
||||
0x93, 0x93, 0x93, 0xFF,
|
||||
]);
|
||||
});
|
||||
|
||||
|
@ -177,8 +177,8 @@ suite('MinimapCharRenderer', () => {
|
|||
actual[i] = imageData.data[i];
|
||||
}
|
||||
assert.deepEqual(actual, [
|
||||
0x55, 0x55, 0x55, 0xff,
|
||||
0x93, 0x93, 0x93, 0xff,
|
||||
0x55, 0x55, 0x55, 0xFF,
|
||||
0x93, 0x93, 0x93, 0xFF,
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
|
@ -853,7 +853,7 @@ export class HighlightingWorkbenchTree extends WorkbenchTree {
|
|||
|
||||
this.refresh().then(() => {
|
||||
if (topElement) {
|
||||
this.reveal(topElement, .5).then(_ => {
|
||||
this.reveal(topElement, 0.5).then(_ => {
|
||||
this.setSelection([topElement], this);
|
||||
this.setFocus(topElement, this);
|
||||
});
|
||||
|
|
|
@ -310,10 +310,10 @@ export const snippetFinalTabstopHighlightBorder = registerColor('editor.snippetF
|
|||
/**
|
||||
* Breadcrumb colors
|
||||
*/
|
||||
export const breadcrumbsForeground = registerColor('breadcrumb.foreground', { light: transparent(foreground, .8), dark: transparent(foreground, .8), hc: transparent(foreground, .8) }, nls.localize('breadcrumbsFocusForeground', "Color of focused breadcrumb items."));
|
||||
export const breadcrumbsForeground = registerColor('breadcrumb.foreground', { light: transparent(foreground, 0.8), dark: transparent(foreground, 0.8), hc: transparent(foreground, 0.8) }, nls.localize('breadcrumbsFocusForeground', "Color of focused breadcrumb items."));
|
||||
export const breadcrumbsBackground = registerColor('breadcrumb.background', { light: editorBackground, dark: editorBackground, hc: editorBackground }, nls.localize('breadcrumbsBackground', "Background color of breadcrumb items."));
|
||||
export const breadcrumbsFocusForeground = registerColor('breadcrumb.focusForeground', { light: darken(foreground, .2), dark: lighten(foreground, .1), hc: lighten(foreground, .1) }, nls.localize('breadcrumbsFocusForeground', "Color of focused breadcrumb items."));
|
||||
export const breadcrumbsActiveSelectionForeground = registerColor('breadcrumb.activeSelectionForeground', { light: darken(foreground, .2), dark: lighten(foreground, .1), hc: lighten(foreground, .1) }, nls.localize('breadcrumbsSelectedForegound', "Color of selected breadcrumb items."));
|
||||
export const breadcrumbsFocusForeground = registerColor('breadcrumb.focusForeground', { light: darken(foreground, 0.2), dark: lighten(foreground, 0.1), hc: lighten(foreground, 0.1) }, nls.localize('breadcrumbsFocusForeground', "Color of focused breadcrumb items."));
|
||||
export const breadcrumbsActiveSelectionForeground = registerColor('breadcrumb.activeSelectionForeground', { light: darken(foreground, 0.2), dark: lighten(foreground, 0.1), hc: lighten(foreground, 0.1) }, nls.localize('breadcrumbsSelectedForegound', "Color of selected breadcrumb items."));
|
||||
export const breadcrumbsPickerBackground = registerColor('breadcrumbPicker.background', { light: editorWidgetBackground, dark: editorWidgetBackground, hc: editorWidgetBackground }, nls.localize('breadcrumbsSelectedBackground', "Background color of breadcrumb item picker."));
|
||||
|
||||
/**
|
||||
|
|
|
@ -356,7 +356,7 @@ export class BreadcrumbsControl {
|
|||
},
|
||||
getAnchor: () => {
|
||||
let maxInnerWidth = window.innerWidth - 8 /*a little less the full widget*/;
|
||||
let maxHeight = Math.min(window.innerHeight * .7, 300);
|
||||
let maxHeight = Math.min(window.innerHeight * 0.7, 300);
|
||||
|
||||
let pickerWidth = Math.min(maxInnerWidth, Math.max(240, maxInnerWidth / 4.17));
|
||||
let pickerArrowSize = 8;
|
||||
|
@ -379,7 +379,7 @@ export class BreadcrumbsControl {
|
|||
pickerArrowOffset = maxPickerArrowOffset;
|
||||
}
|
||||
} else {
|
||||
pickerArrowOffset = (data.left + (data.width * .3)) - x;
|
||||
pickerArrowOffset = (data.left + (data.width * 0.3)) - x;
|
||||
}
|
||||
picker.setInput(element, maxHeight, pickerWidth, pickerArrowSize, Math.max(0, pickerArrowOffset));
|
||||
return { x, y };
|
||||
|
|
|
@ -159,7 +159,7 @@ export abstract class BreadcrumbsPicker {
|
|||
// use proper selection, reveal
|
||||
let selection = this._getInitialSelection(this._tree, input);
|
||||
if (selection) {
|
||||
return this._tree.reveal(selection, .5).then(() => {
|
||||
return this._tree.reveal(selection, 0.5).then(() => {
|
||||
this._tree.setSelection([selection], this._tree);
|
||||
this._tree.setFocus(selection);
|
||||
this._tree.domFocus();
|
||||
|
|
|
@ -529,10 +529,10 @@ export class TitlebarPart extends Part implements ITitleService {
|
|||
if (getTitleBarStyle(this.configurationService, this.environmentService) === 'custom') {
|
||||
// Only prevent zooming behavior on macOS or when the menubar is not visible
|
||||
if (isMacintosh || this.configurationService.getValue<MenuBarVisibility>('window.menuBarVisibility') === 'hidden') {
|
||||
this.title.style.zoom = `${1.0 / getZoomFactor()}`;
|
||||
this.title.style.zoom = `${1 / getZoomFactor()}`;
|
||||
if (isWindows || isLinux) {
|
||||
this.appIcon.style.zoom = `${1.0 / getZoomFactor()}`;
|
||||
this.windowControls.style.zoom = `${1.0 / getZoomFactor()}`;
|
||||
this.appIcon.style.zoom = `${1 / getZoomFactor()}`;
|
||||
this.windowControls.style.zoom = `${1 / getZoomFactor()}`;
|
||||
}
|
||||
} else {
|
||||
this.title.style.zoom = null;
|
||||
|
|
|
@ -249,7 +249,7 @@ export class SuggestEnabledInput extends Widget implements IThemable {
|
|||
registerThemingParticipant((theme, collector) => {
|
||||
let selectionColor = theme.getColor(selectionBackground);
|
||||
if (selectionColor) {
|
||||
selectionColor = selectionColor.transparent(.4);
|
||||
selectionColor = selectionColor.transparent(0.4);
|
||||
} else {
|
||||
selectionColor = theme.getColor(editorSelectionBackground);
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ registerThemingParticipant((theme, collector) => {
|
|||
// Override inactive selection bg
|
||||
const inputBackgroundColor = theme.getColor(inputBackground);
|
||||
if (inputBackground) {
|
||||
collector.addRule(`.suggest-input-container .monaco-editor .selected-text { background-color: ${inputBackgroundColor.transparent(.4)}; }`);
|
||||
collector.addRule(`.suggest-input-container .monaco-editor .selected-text { background-color: ${inputBackgroundColor.transparent(0.4)}; }`);
|
||||
}
|
||||
|
||||
// Override selected fg
|
||||
|
|
|
@ -697,7 +697,7 @@ export class OutlinePanel extends ViewletPanel {
|
|||
let top = this._tree.getRelativeTop(item);
|
||||
if (top < 0 || top > 1) {
|
||||
// only when outside view port
|
||||
await this._tree.reveal(item, .5);
|
||||
await this._tree.reveal(item, 0.5);
|
||||
}
|
||||
this._tree.setFocus(item, this);
|
||||
this._tree.setSelection([item], this);
|
||||
|
|
|
@ -1318,7 +1318,7 @@ export class SettingsTree extends ObjectTree<SettingsTreeElement> {
|
|||
if (foregroundColor) {
|
||||
// Links appear inside other elements in markdown. CSS opacity acts like a mask. So we have to dynamically compute the description color to avoid
|
||||
// applying an opacity to the link color.
|
||||
const fgWithOpacity = new Color(new RGBA(foregroundColor.rgba.r, foregroundColor.rgba.g, foregroundColor.rgba.b, .9));
|
||||
const fgWithOpacity = new Color(new RGBA(foregroundColor.rgba.r, foregroundColor.rgba.g, foregroundColor.rgba.b, 0.9));
|
||||
collector.addRule(`.settings-editor > .settings-body > .settings-tree-container .setting-item .setting-item-description { color: ${fgWithOpacity}; }`);
|
||||
}
|
||||
|
||||
|
|
|
@ -406,7 +406,7 @@ export class SettingsEditor2 extends BaseEditor {
|
|||
let sourceTop = this.settingsTree.getRelativeTop(evt.source);
|
||||
if (sourceTop < 0) {
|
||||
// e.g. clicked a searched element, now the search has been cleared
|
||||
sourceTop = .5;
|
||||
sourceTop = 0.5;
|
||||
}
|
||||
|
||||
this.settingsTree.reveal(elements[0], sourceTop);
|
||||
|
|
|
@ -59,7 +59,7 @@ export const TERMINAL_CONFIG_SECTION = 'terminal.integrated';
|
|||
|
||||
export const DEFAULT_LETTER_SPACING = 0;
|
||||
export const MINIMUM_LETTER_SPACING = -5;
|
||||
export const DEFAULT_LINE_HEIGHT = 1.0;
|
||||
export const DEFAULT_LINE_HEIGHT = 1;
|
||||
|
||||
export type FontWeight = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
||||
|
||||
|
|
|
@ -61,8 +61,8 @@ interface IFileSearchResult {
|
|||
limitReached?: boolean;
|
||||
}
|
||||
|
||||
const LF = 0x0a;
|
||||
const CR = 0x0d;
|
||||
const LF = 0x0A;
|
||||
const CR = 0x0D;
|
||||
|
||||
export class SearchWorkerEngine {
|
||||
private nextSearch: Promise<any> = Promise.resolve(null);
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"no-unsafe-finally": true,
|
||||
"no-unused-expression": true,
|
||||
"no-var-keyword": true,
|
||||
"typeof-compare": true,
|
||||
"number-literal-format": true,
|
||||
"curly": true,
|
||||
"class-name": true,
|
||||
"label-position": true,
|
||||
|
|
Loading…
Reference in a new issue