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

Re-factor Cursor handling per ./docfx/docs/cursor.md #3444

Open
tig opened this issue Apr 30, 2024 · 1 comment
Open

Re-factor Cursor handling per ./docfx/docs/cursor.md #3444

tig opened this issue Apr 30, 2024 · 1 comment
Milestone

Comments

@tig
Copy link
Collaborator

tig commented Apr 30, 2024

Related:

See:

https://github.com/gui-cs/Terminal.Gui/blob/v2_develop/docfx/docs/cursor.md

Note, in this we need to fix Focused and MostFocused such that these unit tests are addressed:

    [Fact, Trait("BUGBUG", "Fix in Issue #3444")]
    public void Focused_NoSubviews ()
    {
        var view = new View ();
        Assert.Null (view.Focused);

        view.CanFocus = true;
        view.SetFocus ();
        Assert.True (view.HasFocus);
        Assert.Null (view.Focused); // BUGBUG: Should be view
    }

    // View.MostFocused - No subviews
    [Fact, Trait ("BUGBUG", "Fix in Issue #3444")]
    public void Most_Focused_NoSubviews ()
    {
        var view = new View ();
        Assert.Null (view.Focused);

        view.CanFocus = true;
        view.SetFocus ();
        Assert.True (view.HasFocus);
        Assert.Null (view.MostFocused); // BUGBUG: Should be view
    }
@dodexahedron
Copy link
Collaborator

dodexahedron commented May 9, 2024

👍

Remember to include the using for those Views.

[MustDisposeResource] whining

Too bad the MustDisposeResourceAttribute is not more flexible like being able to tell it to only care about locals or something, because that'd make these show codefixes.

You _can_ use it in conjunction with HandlesResourseDisposalAttribute, but it's applied by the consuming code. I'd like to be able to specify some sort of filter where MustDisposeResource is used. Oh well...

I do think I've seen something similar on their tracker for feature requests, so maybe some day... *wistfully stares out a window*

@tig tig added this to the V2 Beta milestone May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: 📋 Approved - Need Owner
Development

No branches or pull requests

2 participants