Skip to content

gum input header flags can output an incorrect render #582

@ndsizeif

Description

@ndsizeif

Describe the bug
Setting some of the header properties of gum input including, --header.align and --header.height, can cause rendering over subsequent lines of the output.

To Reproduce
This simple bash script sets a header and aligns it inside a border.

#!/bin/bash

term_width=$(tput cols)
WIDTH=$((term_width / 2))

gum input \
	--header="example header" \
	--header.width=$WIDTH \
	--header.align="center" \
	--header.border="thick"

border14 0

Using a border makes the behavior apparent, but output is also affected without a border. Setting header height to more than 2 obscures the placeholder.

gum input \
	--header="example header" \
	--header.height="4"

height14 0

Expected behavior
The above commands should render as they do using gum v0.13.0

border13 0

height13 0

gum version 0.14.0 (295a671)

Description:    Manjaro Linux
Release:        24.0.0
Codename:       Wynsdey

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions