mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
Clarify editor focus related methods
This commit is contained in:
@@ -92,7 +92,7 @@ function findEditor(model: ITextModel, codeEditorService: ICodeEditorService): I
|
||||
if (model.isAttachedToEditor()) {
|
||||
for (const editor of codeEditorService.listCodeEditors()) {
|
||||
if (editor.getModel() === model) {
|
||||
if (editor.isFocused()) {
|
||||
if (editor.hasTextFocus()) {
|
||||
return editor; // favour focused editor if there are multiple
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user