Skip to content

curses: Textbox() insert mode does not work #111795

@andreabenini

Description

@andreabenini

Bug report

Bug description:

Take a look at this code:

# New input window (parameters are not important here)
winInput = curses.newwin(1, 20, 1, 1)

# This creates an overwrite Textbox()
myOverwriteTextbox = Textbox(winInput)
# This should be an insert mode Textbox(), no overwrite upon existing text
#...but it does NOT work
myInsertTextbox = Textbox(winInput, insert_mode=True)

winInput parameters does not really affect the creation of the Textbox obj below.
While myOverwriteTextbox effectively creates an inputbox in overwrite mode (if you go back and start typing you overwrite actual text) there's a problem with myInsertTextbox. Even if insert_mode=True is correctly passed by (and managed internally) it still behaves in overwrite mode, so if you go backward and start typing you effectively overwrite text already in the textpad.py provided input box.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions