Skip to content

textinput v2: 0 Width breaks placeholders #950

@ShadiestGoat

Description

@ShadiestGoat

Describe the bug
When creating a textinput model with a Width = 0 & a placeholder, only the first character of the placeholder works

Setup
Please complete the following information along with version numbers, if applicable.

  • OS Arch
  • Shell zsh
  • Terminal Emulator kitty
  • Terminal Multiplexer n/a

To Reproduce
Steps to reproduce the behavior:

  1. `ti := textinput.New()
  2. ti.SetWidth(0)
  3. ti.Placeholder = "Something"
  4. ti.View()
  5. Placeholder will only have 1 char

Source Code
n/a

Expected behavior
The full placeholder to be visible, as per this commnent
"if there is no width, the placeholder can be any length"

Screenshots

Real:
Image

Expected:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions