Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

EditSelectionChanged delegate is null #2

Open
aesalazar opened this issue May 12, 2017 · 0 comments
Open

EditSelectionChanged delegate is null #2

aesalazar opened this issue May 12, 2017 · 0 comments

Comments

@aesalazar
Copy link

This is still a great tool despite the report not being change in 6 years :). Not sure if this is the best place to post a bug but here goes.

I started using it again after a long while and the thing keeped up and crashing one me. A hard crash - no warning.

I pulled the repo and ran it and found this to be the problem:

    static void _Editor_TextSelectionChanged(object sender, RoutedEventArgs e)
    {
        EditSelectionChanged(_Editor.SelectedText);
    }

Seems EditSelectionChanged is null. The only reference I could find to it was in ColorPickerPlugin so I assume it being null is not unusual. So I simply changed it to this and the problem went away:

    static void _Editor_TextSelectionChanged(object sender, RoutedEventArgs e)
    {
        EditSelectionChanged?.Invoke(_Editor.SelectedText);
    }

Pretty simple it seems or am I missing something?

Thanks
Ernie

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

No branches or pull requests

1 participant