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

Help bubble has an unwanted right padding #415

Closed
wI2L opened this issue Sep 3, 2023 · 0 comments · Fixed by #516
Closed

Help bubble has an unwanted right padding #415

wI2L opened this issue Sep 3, 2023 · 0 comments · Fixed by #516

Comments

@wI2L
Copy link

wI2L commented Sep 3, 2023

Setup

  • OS: macOS
  • Shell: zsh
  • Terminal Emulator: iTerm2
  • Locale: en_US.UTF-8

Using the help bubble, I noticed that I couldn't properly align horizontally a multi-column (full) help view.

See the following example:

Screenshot 2023-09-04 at 00 02 03

The whole view is horizontally centered inside a fullscreen buffer, using:

return lipgloss.Place(
	termWidth, termHeight,
	lipgloss.Center, lipgloss.Center,
	sb.String(),
)

The border around the help view, here, is rendered only to show that there is a 4 space-char wide padding on the right of the right-most column.

This matches exactly the FullSeparator string width, and after reading the code, it seems clear to me that the separator is added even at the end of a line, when no other help key description follow: here.

I don't know if this is the expected/desired behavior, but in my case this causes the misalignment shown by the screenshot above.

I solved fixed it by adding a left margin that is exactly equal to the rendered width of the full separator (4) in the meantime.

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 a pull request may close this issue.

1 participant