mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 02:02:35 -05:00
Merge VS Code 1.23.1 (#1520)
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import { INewScrollPosition, IViewState } from 'vs/editor/common/editorCommon';
|
||||
import { EndOfLinePreference, IModelDecorationOptions } from 'vs/editor/common/model';
|
||||
import { INewScrollPosition } from 'vs/editor/common/editorCommon';
|
||||
import { EndOfLinePreference, IModelDecorationOptions, IActiveIndentGuideInfo } from 'vs/editor/common/model';
|
||||
import { IViewLineTokens } from 'vs/editor/common/core/lineTokens';
|
||||
import { Position, IPosition } from 'vs/editor/common/core/position';
|
||||
import { Range } from 'vs/editor/common/core/range';
|
||||
@@ -15,6 +15,7 @@ import { Scrollable, IScrollPosition } from 'vs/base/common/scrollable';
|
||||
import { IPartialViewLinesViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData';
|
||||
import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer';
|
||||
import { ITheme } from 'vs/platform/theme/common/themeService';
|
||||
import * as strings from 'vs/base/common/strings';
|
||||
|
||||
export interface IViewWhitespaceViewportData {
|
||||
readonly id: number;
|
||||
@@ -63,9 +64,6 @@ export interface IViewLayout {
|
||||
getLinesViewportDataAtScrollTop(scrollTop: number): IPartialViewLinesViewportData;
|
||||
getWhitespaces(): IEditorWhitespace[];
|
||||
|
||||
saveState(): IViewState;
|
||||
reduceRestoreState(state: IViewState): { scrollLeft: number; scrollTop: number; };
|
||||
|
||||
isAfterLines(verticalOffset: number): boolean;
|
||||
getLineNumberAtVerticalOffset(verticalOffset: number): number;
|
||||
getVerticalOffsetForLineNumber(lineNumber: number): number;
|
||||
@@ -122,9 +120,11 @@ export interface IViewModel {
|
||||
* Gives a hint that a lot of requests are about to come in for these line numbers.
|
||||
*/
|
||||
setViewport(startLineNumber: number, endLineNumber: number, centeredLineNumber: number): void;
|
||||
setHasFocus(hasFocus: boolean): void;
|
||||
|
||||
getDecorationsInViewport(visibleRange: Range): ViewModelDecoration[];
|
||||
getViewLineRenderingData(visibleRange: Range, lineNumber: number): ViewLineRenderingData;
|
||||
getViewLineData(lineNumber: number): ViewLineData;
|
||||
getMinimapLinesRenderingData(startLineNumber: number, endLineNumber: number, needed: boolean[]): MinimapLinesRenderingData;
|
||||
getCompletelyVisibleViewRange(): Range;
|
||||
getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range;
|
||||
@@ -132,6 +132,8 @@ export interface IViewModel {
|
||||
getTabSize(): number;
|
||||
getLineCount(): number;
|
||||
getLineContent(lineNumber: number): string;
|
||||
getLineLength(lineNumber: number): number;
|
||||
getActiveIndentGuide(lineNumber: number, minLineNumber: number, maxLineNumber: number): IActiveIndentGuideInfo;
|
||||
getLinesIndentGuides(startLineNumber: number, endLineNumber: number): number[];
|
||||
getLineMinColumn(lineNumber: number): number;
|
||||
getLineMaxColumn(lineNumber: number): number;
|
||||
@@ -146,7 +148,7 @@ export interface IViewModel {
|
||||
|
||||
deduceModelPositionRelativeToViewPosition(viewAnchorPosition: Position, deltaOffset: number, lineFeedCnt: number): Position;
|
||||
getEOL(): string;
|
||||
getPlainTextToCopy(ranges: Range[], emptySelectionClipboard: boolean): string | string[];
|
||||
getPlainTextToCopy(ranges: Range[], emptySelectionClipboard: boolean, forceCRLF: boolean): string | string[];
|
||||
getHTMLToCopy(ranges: Range[], emptySelectionClipboard: boolean): string;
|
||||
}
|
||||
|
||||
@@ -210,13 +212,13 @@ export class ViewLineRenderingData {
|
||||
*/
|
||||
public readonly content: string;
|
||||
/**
|
||||
* If set to false, it is guaranteed that `content` contains only LTR chars.
|
||||
* Describes if `content` contains RTL characters.
|
||||
*/
|
||||
public readonly mightContainRTL: boolean;
|
||||
public readonly containsRTL: boolean;
|
||||
/**
|
||||
* If set to false, it is guaranteed that `content` contains only basic ASCII chars.
|
||||
* Describes if `content` contains non basic ASCII chars.
|
||||
*/
|
||||
public readonly mightContainNonBasicASCII: boolean;
|
||||
public readonly isBasicASCII: boolean;
|
||||
/**
|
||||
* The tokens at this view line.
|
||||
*/
|
||||
@@ -243,18 +245,35 @@ export class ViewLineRenderingData {
|
||||
this.minColumn = minColumn;
|
||||
this.maxColumn = maxColumn;
|
||||
this.content = content;
|
||||
this.mightContainRTL = mightContainRTL;
|
||||
this.mightContainNonBasicASCII = mightContainNonBasicASCII;
|
||||
|
||||
this.isBasicASCII = ViewLineRenderingData.isBasicASCII(content, mightContainNonBasicASCII);
|
||||
this.containsRTL = ViewLineRenderingData.containsRTL(content, this.isBasicASCII, mightContainRTL);
|
||||
|
||||
this.tokens = tokens;
|
||||
this.inlineDecorations = inlineDecorations;
|
||||
this.tabSize = tabSize;
|
||||
}
|
||||
|
||||
public static isBasicASCII(lineContent: string, mightContainNonBasicASCII: boolean): boolean {
|
||||
if (mightContainNonBasicASCII) {
|
||||
return strings.isBasicASCII(lineContent);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static containsRTL(lineContent: string, isBasicASCII: boolean, mightContainRTL: boolean): boolean {
|
||||
if (!isBasicASCII && mightContainRTL) {
|
||||
return strings.containsRTL(lineContent);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export const enum InlineDecorationType {
|
||||
Regular = 0,
|
||||
Before = 1,
|
||||
After = 2
|
||||
After = 2,
|
||||
RegularAffectingLetterSpacing = 3
|
||||
}
|
||||
|
||||
export class InlineDecoration {
|
||||
|
||||
Reference in New Issue
Block a user