mirror of
https://github.com/Microsoft/vscode
synced 2024-10-12 14:30:13 +00:00
Fix copy action being stolen by terminal chat
What was happening here is chatWidget was called which would initialize the terminal chat widget, so I switched that to check whether the lazy value exists and added a hasFocus check for good measure. Fixes #208413
This commit is contained in:
parent
fb757ca041
commit
abc27efc71
|
@ -115,11 +115,7 @@ export class TerminalChatController extends Disposable implements ITerminalContr
|
|||
}
|
||||
this._register(this._chatCodeBlockContextProviderService.registerProvider({
|
||||
getCodeBlockContext: (editor) => {
|
||||
const chatWidget = this.chatWidget;
|
||||
if (!chatWidget) {
|
||||
return;
|
||||
}
|
||||
if (!editor) {
|
||||
if (!editor || !this._chatWidget?.hasValue || !this.hasFocus()) {
|
||||
return;
|
||||
}
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue