Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected artifacts from lg.JoinVertical #199

Open
NiloCK opened this issue May 24, 2023 · 0 comments
Open

Unexpected artifacts from lg.JoinVertical #199

NiloCK opened this issue May 24, 2023 · 0 comments

Comments

@NiloCK
Copy link

NiloCK commented May 24, 2023

Describe the bug

JoinVertical is adding extra newLines (or otherwise something weird is happening) to the topmost passed text.

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

  • OS: Ubuntu
  • Shell ... the ubuntu shell?
  • Terminal Emulator [e.g. kitty, iterm]
  • Terminal Multiplexer: under tmux & with no multiplexer
  • Locale: unsure

To Reproduce
Steps to reproduce the behavior:

git clone http://github.com/nilock/tuido
cd tuido
go run .
[press ENTER] - opens context preview on the first listed todo item]

This will display the broken text from below.

To see the same text unbroken, replace return lg.JoinVertical(lg.Left, bodyWithPointer, foot) with return bodyWithPointer on line 44 of ./tui/peek.go, and rerun the above instructions.

Source Code
http://github.com/nilock/tuido

Expected behavior
See screenshots.

Screenshots

Broken text:

image

The same text not joined with the footer:

image

Additional context
The broken text is read at runtime from files on disk. The breaking newline behaviour only occurs when rendering .go files - the .md (eg, readme.md) file gets rendered correctly. AFAICT, both are Uni-8. I can't guess why the discrepancy, but this feels like a good clue.

Some other things are happening to this text before the JoinVertical

  • colorized with monokai
  • joined with the pointer + border on left via JoinHorizontal
  • styled with padding

... Manually removing each of these showed no effect - the described issue still presents.

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

No branches or pull requests

1 participant