diff --git a/src/vs/editor/browser/controller/keyboardHandler.ts b/src/vs/editor/browser/controller/keyboardHandler.ts index 3002ec12fc8..6341ee3386a 100644 --- a/src/vs/editor/browser/controller/keyboardHandler.ts +++ b/src/vs/editor/browser/controller/keyboardHandler.ts @@ -189,11 +189,6 @@ export class KeyboardHandler extends ViewEventHandler implements IDisposable { return false; } - public onCursorPositionChanged(e:editorCommon.IViewCursorPositionChangedEvent): boolean { - this.textAreaHandler.setCursorPosition(e.position); - return false; - } - public onLayoutChanged(layoutInfo:editorCommon.EditorLayoutInfo): boolean { this.contentLeft = layoutInfo.contentLeft; this.contentWidth = layoutInfo.contentWidth; diff --git a/src/vs/editor/common/controller/textAreaHandler.ts b/src/vs/editor/common/controller/textAreaHandler.ts index 4aa7e5bb3b1..aa6cbcd0be8 100644 --- a/src/vs/editor/common/controller/textAreaHandler.ts +++ b/src/vs/editor/common/controller/textAreaHandler.ts @@ -9,7 +9,6 @@ import Event, {Emitter} from 'vs/base/common/event'; import {CommonKeybindings} from 'vs/base/common/keyCodes'; import {Disposable} from 'vs/base/common/lifecycle'; import {IClipboardEvent, ICompositionEvent, IKeyboardEventWrapper, ISimpleModel, ITextAreaWrapper, ITypeData, TextAreaState, TextAreaStrategy, createTextAreaState} from 'vs/editor/common/controller/textAreaState'; -import {Position} from 'vs/editor/common/core/position'; import {Range} from 'vs/editor/common/core/range'; import {EndOfLinePreference} from 'vs/editor/common/editorCommon'; @@ -74,7 +73,6 @@ export class TextAreaHandler extends Disposable { private asyncTriggerCut: RunOnceScheduler; private lastCompositionEndTime:number; - private cursorPosition:Position; private textAreaState:TextAreaState; private textareaIsShownAtCursor: boolean; @@ -92,7 +90,6 @@ export class TextAreaHandler extends Disposable { this.flushAnyAccumulatedEvents = flushAnyAccumulatedEvents; this.selection = new Range(1, 1, 1, 1); this.selections = [new Range(1, 1, 1, 1)]; - this.cursorPosition = new Position(1, 1); this._nextCommand = ReadFromTextArea.Type; this.asyncTriggerCut = new RunOnceScheduler(() => this._onCut.fire(), 0); @@ -241,10 +238,6 @@ export class TextAreaHandler extends Disposable { this._writePlaceholderAndSelectTextArea('selection changed'); } - public setCursorPosition(primary: Position): void { - this.cursorPosition = primary; - } - // --- end event handlers private setTextAreaState(reason:string, textAreaState:TextAreaState): void { diff --git a/src/vs/editor/test/browser/controller/imeTester.ts b/src/vs/editor/test/browser/controller/imeTester.ts index c55a594c32a..4b5495217fd 100644 --- a/src/vs/editor/test/browser/controller/imeTester.ts +++ b/src/vs/editor/test/browser/controller/imeTester.ts @@ -123,7 +123,6 @@ function doCreateTest(strategy:TextAreaStrategy, description:string, inputStr:st let updatePosition = (off:number, len:number) => { cursorOffset = off; cursorLength = len; - handler.setCursorPosition(new Position(1, 1 + cursorOffset + cursorLength)); handler.setCursorSelections(new Range(1, 1 + cursorOffset, 1, 1 + cursorOffset + cursorLength), []); handler.writePlaceholderAndSelectTextAreaSync(); };