提交 8e8db438 编写于 作者: I isidor

simple editor: adress comments

上级 4c91d891
......@@ -33,7 +33,7 @@ import { Color } from 'vs/base/common/color';
import { IMouseEvent } from 'vs/base/browser/mouseEvent';
import { ClassName } from 'vs/editor/common/model/intervalTree';
import { ITextModel, IModelDecorationOptions } from 'vs/editor/common/model';
import { ICommandDelegate } from '../view/viewController';
import { ICommandDelegate } from 'vs/editor/browser/view/viewController';
export abstract class CodeEditorWidget extends CommonCodeEditor implements editorBrowser.ICodeEditor {
......
......@@ -1051,7 +1051,7 @@ class EditorContextKeysManager extends Disposable {
private _editor: CommonCodeEditor;
private _editorFocus: IContextKey<boolean>;
private _inputFocus: IContextKey<boolean>;
private _textInputFocus: IContextKey<boolean>;
private _editorTextFocus: IContextKey<boolean>;
private _editorTabMovesFocus: IContextKey<boolean>;
private _editorReadonly: IContextKey<boolean>;
......@@ -1068,7 +1068,7 @@ class EditorContextKeysManager extends Disposable {
contextKeyService.createKey('editorId', editor.getId());
this._editorFocus = EditorContextKeys.focus.bindTo(contextKeyService);
this._inputFocus = EditorContextKeys.inputFocus.bindTo(contextKeyService);
this._textInputFocus = EditorContextKeys.textInputFocus.bindTo(contextKeyService);
this._editorTextFocus = EditorContextKeys.textFocus.bindTo(contextKeyService);
this._editorTabMovesFocus = EditorContextKeys.tabMovesFocus.bindTo(contextKeyService);
this._editorReadonly = EditorContextKeys.readOnly.bindTo(contextKeyService);
......@@ -1108,7 +1108,7 @@ class EditorContextKeysManager extends Disposable {
private _updateFromFocus(): void {
this._editorFocus.set(this._editor.hasWidgetFocus() && !this._editor.isSimpleWidget);
this._editorTextFocus.set(this._editor.isFocused() && !this._editor.isSimpleWidget);
this._inputFocus.set(this._editor.isFocused());
this._textInputFocus.set(this._editor.isFocused());
}
}
......
......@@ -19,7 +19,7 @@ export namespace EditorContextKeys {
/**
* A context key that is set when any editor input has focus (regular editor, repl input...).
*/
export const inputFocus = new RawContextKey<boolean>('inputFocus', false);
export const textInputFocus = new RawContextKey<boolean>('textInputFocus', false);
export const readOnly = new RawContextKey<boolean>('editorReadonly', false);
export const writable: ContextKeyExpr = readOnly.toNegated();
......
......@@ -30,7 +30,7 @@ export class ReplInputEditor extends CodeEditorWidget {
@IContextKeyService contextKeyService: IContextKeyService,
@IThemeService themeService: IThemeService
) {
super(domElement, options, true, instantiationService, codeEditorService, commandService, contextKeyService, themeService);
super(domElement, options, false, instantiationService, codeEditorService, commandService, contextKeyService, themeService);
}
protected _getContributions(): IEditorContributionCtor[] {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册