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

Gum write limited to 99 lines despite --char-limit 0 #666

Open
fbnlbl-hws opened this issue Sep 2, 2024 · 1 comment
Open

Gum write limited to 99 lines despite --char-limit 0 #666

fbnlbl-hws opened this issue Sep 2, 2024 · 1 comment

Comments

@fbnlbl-hws
Copy link

Describe the bug
Gum write limited to 99 lines despite --char-limit 0.
Gum version: v0.14.4 (9c11289)

To Reproduce
Steps to reproduce the behavior:

yes "HelloWorld" | head -n 110 | gum write --show-line-numbers --char-limit 0

Expected behavior
110 lines of HelloWorld in the open editor.

Screenshots
image

Desktop (please complete the following information):

  • OS: Red Hat Enterprise Linux 8.10 (Ootpa)
  • Kernel: Linux 4.18.0-553.5.1.el8_10.x86_64
  • Gum version: gum version v0.14.4 (9c11289)
@fbnlbl-hws
Copy link
Author

fbnlbl-hws commented Sep 12, 2024

The max line count of 99 is apparently based on the default 2d rune slice in bubbles textarea New() function.
It uses the defaultMaxHeight as a line count during initialization, which is set to 99.

textarea.go#L287

make([][]rune, minHeight, defaultMaxHeight)

This seems to be a hard coded line maximum for the gum write tool.
Would be great if it were possible to set this value via flags.

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