-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple widget editor that is hidden from extensions #46169
Conversation
…do not intercept commands
@@ -33,6 +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'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolute imports
/** | ||
* A context key that is set when any editor input has focus (regular editor, repl input...). | ||
*/ | ||
export const inputFocus = new RawContextKey<boolean>('inputFocus', false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's ask in the stand-up what would be a good name. Perhaps textInputFocus
is better than inputFocus
, as there might in the future be other types of input
s, like drop downs or radio buttons...
@@ -30,7 +30,7 @@ export class ReplInputEditor extends CodeEditorWidget { | |||
@IContextKeyService contextKeyService: IContextKeyService, | |||
@IThemeService themeService: IThemeService | |||
) { | |||
super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, themeService); | |||
super(domElement, options, true, instantiationService, codeEditorService, commandService, contextKeyService, themeService); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's postpone turning the flag to true
here until we get the commands sorted out. Otherwise, I don't think cursor left/cursor right will work in the repl.
#46112
Introduces a new "type" of editor that will not be sent to extensions. Work that needs to be done:
isSimpleWdiget
flag such that basic commands are not sent via command service so extensions can not intercepteditorTextFocus
to not be set for simple editorsinputFocus
which will be set for both simple and regular editorstextFocus
(probably will not be a part of this PR due to large number of files touched)