Skip to content

Float xcursor/ycursor #182

Open
Open
@Carreau

Description

@Carreau

I think I understand the usage of (x|y)cursor in Float that are after used here in write_to_screen, do you think it could be a better/simpler idea to have a singleton cursor_pos = object() (or even a specific string "cursor") that could could be use for Floats top/left/bottom/right arguments ?

The advantage of the Cursor singleton object is you could implement __add__/__sub__ dunder,

And do things like:

from prompt_toolkit.shortcut import cursor as c
Float(left=c+1, top=c-3)

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions