mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge VS Code 1.31.1 (#4283)
This commit is contained in:
@@ -60,8 +60,7 @@ export class ViewContentWidgets extends ViewPart {
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
let keys = Object.keys(this._widgets);
|
||||
for (let i = 0, len = keys.length; i < len; i++) {
|
||||
const widgetId = keys[i];
|
||||
for (const widgetId of keys) {
|
||||
this._widgets[widgetId].onConfigurationChanged(e);
|
||||
}
|
||||
return true;
|
||||
@@ -75,8 +74,7 @@ export class ViewContentWidgets extends ViewPart {
|
||||
}
|
||||
public onLineMappingChanged(e: viewEvents.ViewLineMappingChangedEvent): boolean {
|
||||
let keys = Object.keys(this._widgets);
|
||||
for (let i = 0, len = keys.length; i < len; i++) {
|
||||
const widgetId = keys[i];
|
||||
for (const widgetId of keys) {
|
||||
this._widgets[widgetId].onLineMappingChanged(e);
|
||||
}
|
||||
return true;
|
||||
@@ -142,24 +140,21 @@ export class ViewContentWidgets extends ViewPart {
|
||||
|
||||
public onBeforeRender(viewportData: ViewportData): void {
|
||||
let keys = Object.keys(this._widgets);
|
||||
for (let i = 0, len = keys.length; i < len; i++) {
|
||||
const widgetId = keys[i];
|
||||
for (const widgetId of keys) {
|
||||
this._widgets[widgetId].onBeforeRender(viewportData);
|
||||
}
|
||||
}
|
||||
|
||||
public prepareRender(ctx: RenderingContext): void {
|
||||
let keys = Object.keys(this._widgets);
|
||||
for (let i = 0, len = keys.length; i < len; i++) {
|
||||
const widgetId = keys[i];
|
||||
for (const widgetId of keys) {
|
||||
this._widgets[widgetId].prepareRender(ctx);
|
||||
}
|
||||
}
|
||||
|
||||
public render(ctx: RestrictedRenderingContext): void {
|
||||
let keys = Object.keys(this._widgets);
|
||||
for (let i = 0, len = keys.length; i < len; i++) {
|
||||
const widgetId = keys[i];
|
||||
for (const widgetId of keys) {
|
||||
this._widgets[widgetId].render(ctx);
|
||||
}
|
||||
}
|
||||
@@ -458,9 +453,8 @@ class Widget {
|
||||
// Do two passes, first for perfect fit, second picks first option
|
||||
if (this._preference) {
|
||||
for (let pass = 1; pass <= 2; pass++) {
|
||||
for (let i = 0; i < this._preference.length; i++) {
|
||||
for (const pref of this._preference) {
|
||||
// placement
|
||||
let pref = this._preference[i];
|
||||
if (pref === ContentWidgetPositionPreference.ABOVE) {
|
||||
if (!placement) {
|
||||
// Widget outside of viewport
|
||||
|
||||
@@ -65,7 +65,6 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay {
|
||||
const selectionIsEmpty = e.selections[0].isEmpty();
|
||||
if (this._selectionIsEmpty !== selectionIsEmpty) {
|
||||
this._selectionIsEmpty = selectionIsEmpty;
|
||||
hasChanged = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@ export class CurrentLineMarginHighlightOverlay extends DynamicViewOverlay {
|
||||
const selectionIsEmpty = e.selections[0].isEmpty();
|
||||
if (this._selectionIsEmpty !== selectionIsEmpty) {
|
||||
this._selectionIsEmpty = selectionIsEmpty;
|
||||
hasChanged = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ export class EditorScrollbar extends ViewPart {
|
||||
handleMouseWheel: configScrollbarOpts.handleMouseWheel,
|
||||
arrowSize: configScrollbarOpts.arrowSize,
|
||||
mouseWheelScrollSensitivity: configScrollbarOpts.mouseWheelScrollSensitivity,
|
||||
fastScrollSensitivity: configScrollbarOpts.fastScrollSensitivity,
|
||||
};
|
||||
|
||||
this.scrollbar = this._register(new SmoothScrollableElement(linesContent.domNode, scrollbarOptions, this._context.viewLayout.scrollable));
|
||||
@@ -127,7 +128,8 @@ export class EditorScrollbar extends ViewPart {
|
||||
const editor = this._context.configuration.editor;
|
||||
let newOpts: ScrollableElementChangeOptions = {
|
||||
handleMouseWheel: editor.viewInfo.scrollbar.handleMouseWheel,
|
||||
mouseWheelScrollSensitivity: editor.viewInfo.scrollbar.mouseWheelScrollSensitivity
|
||||
mouseWheelScrollSensitivity: editor.viewInfo.scrollbar.mouseWheelScrollSensitivity,
|
||||
fastScrollSensitivity: editor.viewInfo.scrollbar.fastScrollSensitivity
|
||||
};
|
||||
this.scrollbar.updateOptions(newOpts);
|
||||
}
|
||||
|
||||
@@ -173,8 +173,7 @@ export class ViewLine implements IVisibleLine {
|
||||
|
||||
if (alwaysRenderInlineSelection || options.themeType === HIGH_CONTRAST) {
|
||||
const selections = viewportData.selections;
|
||||
for (let i = 0, len = selections.length; i < len; i++) {
|
||||
const selection = selections[i];
|
||||
for (const selection of selections) {
|
||||
|
||||
if (selection.endLineNumber < lineNumber || selection.startLineNumber > lineNumber) {
|
||||
// Selection does not intersect line
|
||||
|
||||
@@ -14,16 +14,9 @@
|
||||
100% { background-color: none }
|
||||
}*/
|
||||
|
||||
.monaco-editor.safari .lines-content,
|
||||
.monaco-editor.safari .view-line,
|
||||
.monaco-editor.safari .view-lines {
|
||||
-webkit-user-select: text;
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.monaco-editor .lines-content,
|
||||
.monaco-editor .view-line,
|
||||
.monaco-editor .view-lines {
|
||||
.monaco-editor.no-user-select .lines-content,
|
||||
.monaco-editor.no-user-select .view-line,
|
||||
.monaco-editor.no-user-select .view-lines {
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
|
||||
@@ -639,8 +639,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost<ViewLine>,
|
||||
};
|
||||
}
|
||||
|
||||
for (let i = 0; i < visibleRanges.length; i++) {
|
||||
let visibleRange = visibleRanges[i];
|
||||
for (const visibleRange of visibleRanges) {
|
||||
if (visibleRange.left < boxStartX) {
|
||||
boxStartX = visibleRange.left;
|
||||
}
|
||||
|
||||
@@ -132,8 +132,7 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler {
|
||||
let currentFrom = 0;
|
||||
let currentTo = 0;
|
||||
|
||||
for (let i = 0, len = colorZones.length; i < len; i++) {
|
||||
const zone = colorZones[i];
|
||||
for (const zone of colorZones) {
|
||||
|
||||
const zoneColorId = zone.colorId;
|
||||
const zoneFrom = zone.from;
|
||||
|
||||
@@ -180,8 +180,8 @@ export class ViewCursors extends ViewPart {
|
||||
if (shouldRender(this._primaryCursor.getPosition())) {
|
||||
return true;
|
||||
}
|
||||
for (let i = 0; i < this._secondaryCursors.length; i++) {
|
||||
if (shouldRender(this._secondaryCursors[i].getPosition())) {
|
||||
for (const secondaryCursor of this._secondaryCursors) {
|
||||
if (shouldRender(secondaryCursor.getPosition())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user