mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-23 05:10:30 -04:00
Merge from vscode b12f623603e2fc1c5b3037115fa37c1a6acc4165 (#6760)
This commit is contained in:
@@ -193,7 +193,7 @@ export class CodeLensWidget {
|
||||
|
||||
private readonly _editor: editorBrowser.ICodeEditor;
|
||||
private readonly _viewZone!: CodeLensViewZone;
|
||||
private readonly _viewZoneId!: number;
|
||||
private readonly _viewZoneId!: string;
|
||||
private readonly _contentWidget!: CodeLensContentWidget;
|
||||
private _decorationIds: string[];
|
||||
private _data: CodeLensItem[];
|
||||
|
||||
@@ -116,7 +116,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
|
||||
private readonly _replaceFocusTracker: dom.IFocusTracker;
|
||||
private readonly _replaceInputFocused: IContextKey<boolean>;
|
||||
private _viewZone?: FindWidgetViewZone;
|
||||
private _viewZoneId?: number;
|
||||
private _viewZoneId?: string;
|
||||
|
||||
private _resizeSash!: Sash;
|
||||
private _resized!: boolean;
|
||||
@@ -224,15 +224,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
|
||||
if (!this._isVisible) {
|
||||
return;
|
||||
}
|
||||
if (this._viewZoneId === undefined) {
|
||||
return;
|
||||
}
|
||||
this._codeEditor.changeViewZones((accessor) => {
|
||||
if (this._viewZoneId) {
|
||||
accessor.removeZone(this._viewZoneId);
|
||||
}
|
||||
this._viewZoneId = undefined;
|
||||
});
|
||||
this._viewZoneId = undefined;
|
||||
}));
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IMarkdownString } from 'vs/base/common/htmlContent';
|
||||
import { renderMarkdown, RenderOptions } from 'vs/base/browser/htmlContentRenderer';
|
||||
import { renderMarkdown, MarkdownRenderOptions } from 'vs/base/browser/markdownRenderer';
|
||||
import { IOpenerService, NullOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { IModeService } from 'vs/editor/common/services/modeService';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
@@ -33,7 +33,7 @@ export class MarkdownRenderer extends Disposable {
|
||||
super();
|
||||
}
|
||||
|
||||
private getOptions(disposeables: DisposableStore): RenderOptions {
|
||||
private getOptions(disposeables: DisposableStore): MarkdownRenderOptions {
|
||||
return {
|
||||
codeBlockRenderer: (languageAlias, value) => {
|
||||
// In markdown,
|
||||
|
||||
@@ -27,6 +27,7 @@ export const KnownSnippetVariableNames: { [key: string]: true } = Object.freeze(
|
||||
'CURRENT_DAY_NAME_SHORT': true,
|
||||
'CURRENT_MONTH_NAME': true,
|
||||
'CURRENT_MONTH_NAME_SHORT': true,
|
||||
'CURRENT_SECONDS_UNIX': true,
|
||||
'SELECTION': true,
|
||||
'CLIPBOARD': true,
|
||||
'TM_SELECTED_TEXT': true,
|
||||
@@ -245,6 +246,8 @@ export class TimeBasedVariableResolver implements VariableResolver {
|
||||
return TimeBasedVariableResolver.monthNames[new Date().getMonth()];
|
||||
} else if (name === 'CURRENT_MONTH_NAME_SHORT') {
|
||||
return TimeBasedVariableResolver.monthNamesShort[new Date().getMonth()];
|
||||
} else if (name === 'CURRENT_SECONDS_UNIX') {
|
||||
return String(Math.floor(Date.now() / 1000));
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
||||
@@ -281,6 +281,7 @@ suite('Snippet Variables Resolver', function () {
|
||||
assertVariableResolve3(resolver, 'CURRENT_DAY_NAME_SHORT');
|
||||
assertVariableResolve3(resolver, 'CURRENT_MONTH_NAME');
|
||||
assertVariableResolve3(resolver, 'CURRENT_MONTH_NAME_SHORT');
|
||||
assertVariableResolve3(resolver, 'CURRENT_SECONDS_UNIX');
|
||||
});
|
||||
|
||||
test('creating snippet - format-condition doesn\'t work #53617', function () {
|
||||
|
||||
@@ -51,7 +51,7 @@ const WIDGET_ID = 'vs.editor.contrib.zoneWidget';
|
||||
export class ViewZoneDelegate implements IViewZone {
|
||||
|
||||
public domNode: HTMLElement;
|
||||
public id: number = 0; // A valid zone id should be greater than 0
|
||||
public id: string = ''; // A valid zone id should be greater than 0
|
||||
public afterLineNumber: number;
|
||||
public afterColumn: number;
|
||||
public heightInLines: number;
|
||||
|
||||
Reference in New Issue
Block a user