mirror 'source' when cursor changes, #8093

This commit is contained in:
Johannes Rieken
2016-07-14 12:34:51 +02:00
parent 24feea5a75
commit 16926be391
4 changed files with 21 additions and 13 deletions

View File

@@ -12,8 +12,8 @@ import {TPromise} from 'vs/base/common/winjs.base';
import {IThreadService} from 'vs/workbench/services/thread/common/threadService';
import {ExtHostDocuments, ExtHostDocumentData} from 'vs/workbench/api/node/extHostDocuments';
import {Selection, Range, Position, EditorOptions, EndOfLine, TextEditorRevealType} from './extHostTypes';
import {ISingleEditOperation, ISelection} from 'vs/editor/common/editorCommon';
import {IResolvedTextEditorConfiguration} from 'vs/workbench/api/node/mainThreadEditorsTracker';
import {ISingleEditOperation} from 'vs/editor/common/editorCommon';
import {IResolvedTextEditorConfiguration, ISelectionChangeEvent} from 'vs/workbench/api/node/mainThreadEditorsTracker';
import * as TypeConverters from './extHostTypeConverters';
import {TextDocument, TextEditorSelectionChangeEvent, TextEditorOptionsChangeEvent, TextEditorOptions, TextEditorViewColumnChangeEvent, ViewColumn} from 'vscode';
import {MainContext, MainThreadEditorsShape, ExtHostEditorsShape, ITextEditorAddData, ITextEditorPositionData} from './extHost.protocol';
@@ -102,8 +102,8 @@ export class ExtHostEditors extends ExtHostEditorsShape {
});
}
$acceptSelectionsChanged(id: string, _selections: ISelection[]): void {
let selections = _selections.map(TypeConverters.toSelection);
$acceptSelectionsChanged(id: string, event: ISelectionChangeEvent): void {
let selections = event.selections.map(TypeConverters.toSelection);
let editor = this._editors[id];
editor._acceptSelections(selections);
this._onDidChangeTextEditorSelection.fire({