mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 09:35:40 -05:00
Initial VS Code 1.19 source merge (#571)
* Initial 1.19 xcopy * Fix yarn build * Fix numerous build breaks * Next batch of build break fixes * More build break fixes * Runtime breaks * Additional post merge fixes * Fix windows setup file * Fix test failures. * Update license header blocks to refer to source eula
This commit is contained in:
@@ -82,7 +82,9 @@ export class CursorConfiguration {
|
||||
public readonly autoClosingPairsOpen: CharacterMap;
|
||||
public readonly autoClosingPairsClose: CharacterMap;
|
||||
public readonly surroundingPairs: CharacterMap;
|
||||
public readonly electricChars: { [key: string]: boolean; };
|
||||
|
||||
private readonly _languageIdentifier: LanguageIdentifier;
|
||||
private _electricChars: { [key: string]: boolean; };
|
||||
|
||||
public static shouldRecreate(e: IConfigurationChangedEvent): boolean {
|
||||
return (
|
||||
@@ -102,6 +104,8 @@ export class CursorConfiguration {
|
||||
modelOptions: TextModelResolvedOptions,
|
||||
configuration: IConfiguration
|
||||
) {
|
||||
this._languageIdentifier = languageIdentifier;
|
||||
|
||||
let c = configuration.editor;
|
||||
|
||||
this.readOnly = c.readOnly;
|
||||
@@ -119,14 +123,7 @@ export class CursorConfiguration {
|
||||
this.autoClosingPairsOpen = {};
|
||||
this.autoClosingPairsClose = {};
|
||||
this.surroundingPairs = {};
|
||||
this.electricChars = {};
|
||||
|
||||
let electricChars = CursorConfiguration._getElectricCharacters(languageIdentifier);
|
||||
if (electricChars) {
|
||||
for (let i = 0; i < electricChars.length; i++) {
|
||||
this.electricChars[electricChars[i]] = true;
|
||||
}
|
||||
}
|
||||
this._electricChars = null;
|
||||
|
||||
let autoClosingPairs = CursorConfiguration._getAutoClosingPairs(languageIdentifier);
|
||||
if (autoClosingPairs) {
|
||||
@@ -144,6 +141,19 @@ export class CursorConfiguration {
|
||||
}
|
||||
}
|
||||
|
||||
public get electricChars() {
|
||||
if (!this._electricChars) {
|
||||
this._electricChars = {};
|
||||
let electricChars = CursorConfiguration._getElectricCharacters(this._languageIdentifier);
|
||||
if (electricChars) {
|
||||
for (let i = 0; i < electricChars.length; i++) {
|
||||
this._electricChars[electricChars[i]] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return this._electricChars;
|
||||
}
|
||||
|
||||
public normalizeIndentation(str: string): string {
|
||||
return TextModel.normalizeIndentation(str, this.tabSize, this.insertSpaces);
|
||||
}
|
||||
@@ -335,11 +345,6 @@ export class CursorContext {
|
||||
return this.viewModel.getCompletelyVisibleViewRangeAtScrollTop(scrollTop);
|
||||
}
|
||||
|
||||
public getCompletelyVisibleModelRangeAtScrollTop(scrollTop: number): Range {
|
||||
const viewRange = this.viewModel.getCompletelyVisibleViewRangeAtScrollTop(scrollTop);
|
||||
return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange);
|
||||
}
|
||||
|
||||
public getVerticalOffsetForViewLine(viewLineNumber: number): number {
|
||||
return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewLineNumber);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user