Skip to content
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

Fire onDidChangeVisibleTextEditors on editors change #4571

Merged
merged 1 commit into from
Mar 15, 2019
Merged

Conversation

mmorhun
Copy link
Contributor

@mmorhun mmorhun commented Mar 14, 2019

Signed-off-by: Mykola Morhun mmorhun@redhat.com

Before we fired onDidChangeVisibleTextEditors on documents change what is wrong. This PR fixes that problem and reacts on editors change now.

Resolves: #4221

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
@benoitf
Copy link
Contributor

benoitf commented Mar 14, 2019

hello, how were you able to test ?

@akosyakov
Copy link
Member

@mmorhun the same as @benoitf, could you clarify how one can check (with which VS Code extension) that issue is gone, #4221 is not informative

@mmorhun
Copy link
Contributor Author

mmorhun commented Mar 15, 2019

@benoitf @akosyakov I've tested it with simple plug-in, which just logs data from each onDidChangeVisibleTextEditors event.

@akosyakov
Copy link
Member

@mmorhun Do you still have it?

@mmorhun
Copy link
Contributor Author

mmorhun commented Mar 15, 2019

@akosyakov just generated frontend plug-in with the following code:

import * as theia from '@theia/plugin';

export function start(context: theia.PluginContext) {
    theia.window.onDidChangeVisibleTextEditors((editors: theia.TextEditor[]) => {
        let list: string = '';
        for (let editor of editors) {
            list += editor.document.uri.toString() + ', ';
        }
        console.log(list);
    });
}

export function stop() { }

@vitaliy-guliy vitaliy-guliy requested review from akurinnoy and removed request for evidolob and akurinnoy March 15, 2019 09:23
@mmorhun mmorhun merged commit 625ed2a into master Mar 15, 2019
@mmorhun mmorhun deleted the theia-4221 branch March 15, 2019 12:28
@vitaliy-guliy
Copy link
Contributor

@mmorhun Thanks for the fix!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[plug-in] window.onDidChangeVisibleTextEditors event contains wrong amount of editors
5 participants