Skip to content

Keep the Add Target cursor visible for long hostnames - #149

Merged
lance0 merged 1 commit into
masterfrom
fix/target-input-viewport
Oct 16, 2026
Merged

lance0 merged 1 commit into
masterfrom
fix/target-input-viewport

Conversation

@lance0

@lance0 lance0 commented Oct 16, 2026

Copy link
Copy Markdown
Owner

The Add Target dialog rendered the entire input from column zero. Once a hostname exceeded the field width, the cursor and typed suffix disappeared; moving left/right still edited the hidden text.

Render a horizontal window around the cursor, reserving cells for the prompt and cursor marker. Long FQDNs stay editable at the beginning, middle and end, while short inputs retain their existing appearance. This only changes rendering; the submitted hostname remains complete.

Validation: buffer-rendering regressions fail on the original code and pass with this fix. Tests cover long hostnames at multiple terminal widths, edits at the tail, and cursor movement through the field; existing input editing/ASCII tests pass. Also passed cargo build --locked, cargo test --locked, cargo clippy --locked --all-targets -- -D warnings, cargo fmt -- --check, and rustdoc with warnings denied.

@lance0
lance0 marked this pull request as ready for review October 16, 2026 15:40
@lance0
lance0 merged commit ee8859c into master Oct 16, 2026
6 checks passed
@lance0
lance0 deleted the fix/target-input-viewport branch October 16, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant