mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-06-19 01:55:07 -04:00
Merge from vscode cfc1ab4c5f816765b91fb7ead3c3427a7c8581a3
This commit is contained in:
@@ -32,7 +32,7 @@ import { ISelection, Selection } from 'vs/editor/common/core/selection';
|
||||
import { InternalEditorAction } from 'vs/editor/common/editorAction';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
|
||||
import { EndOfLinePreference, IIdentifiedSingleEditOperation, IModelDecoration, IModelDecorationOptions, IModelDecorationsChangeAccessor, IModelDeltaDecoration, ITextModel, ICursorStateComputer } from 'vs/editor/common/model';
|
||||
import { EndOfLinePreference, IIdentifiedSingleEditOperation, IModelDecoration, IModelDecorationOptions, IModelDecorationsChangeAccessor, IModelDeltaDecoration, ITextModel, ICursorStateComputer, IWordAtPosition } from 'vs/editor/common/model';
|
||||
import { ClassName } from 'vs/editor/common/model/intervalTree';
|
||||
import { ModelDecorationOptions } from 'vs/editor/common/model/textModel';
|
||||
import { IModelContentChangedEvent, IModelDecorationsChangedEvent, IModelLanguageChangedEvent, IModelLanguageConfigurationChangedEvent, IModelOptionsChangedEvent } from 'vs/editor/common/model/textModelEvents';
|
||||
@@ -52,6 +52,7 @@ import { IAccessibilityService } from 'vs/platform/accessibility/common/accessib
|
||||
import { withNullAsUndefined } from 'vs/base/common/types';
|
||||
import { MonospaceLineBreaksComputerFactory } from 'vs/editor/common/viewModel/monospaceLineBreaksComputer';
|
||||
import { DOMLineBreaksComputerFactory } from 'vs/editor/browser/view/domLineBreaksComputer';
|
||||
import { WordOperations } from 'vs/editor/common/controller/cursorWordOperations';
|
||||
|
||||
let EDITOR_ID = 0;
|
||||
|
||||
@@ -376,6 +377,13 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE
|
||||
return this._configuration.getRawOptions();
|
||||
}
|
||||
|
||||
public getConfiguredWordAtPosition(position: Position): IWordAtPosition | null {
|
||||
if (!this._modelData) {
|
||||
return null;
|
||||
}
|
||||
return WordOperations.getWordAtPosition(this._modelData.model, this._configuration.options.get(EditorOption.wordSeparators), position);
|
||||
}
|
||||
|
||||
public getValue(options: { preserveBOM: boolean; lineEnding: string; } | null = null): string {
|
||||
if (!this._modelData) {
|
||||
return '';
|
||||
@@ -542,7 +550,7 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE
|
||||
const validatedModelRange = this._modelData.model.validateRange(modelRange);
|
||||
const viewRange = this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(validatedModelRange);
|
||||
|
||||
this._modelData.cursor.emitCursorRevealRange('api', viewRange, verticalType, revealHorizontal, scrollType);
|
||||
this._modelData.cursor.emitCursorRevealRange('api', viewRange, null, verticalType, revealHorizontal, scrollType);
|
||||
}
|
||||
|
||||
public revealLine(lineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void {
|
||||
|
||||
Reference in New Issue
Block a user