RoyalTerminal - Scrollback lines setting not applied

Hi @stefan_koell ,

I just noticed that the Scrollback lines setting is not applied anymore.
I usually set mine to 30k lines but after counting, I only can get the last 90 lines.

Whatever the value is set to, it does not keep more :thinking:

Best Regards,
Nicolas.

Hi Nicolas,

thanks for reporting the issue. I can reproduce it and I’m working on a fix.

cheers,
Stefan

Turns out this is a bug in ghostty: turns out it is using a bytes budget internally instead of scrollback lines.

For now I’m trying to “calculate” the scrollback lines based on the terminal size. So this will be a rough estimate which can change if the terminal size is changing. This workaround will be removed once ghostty fixes this and exposes it in libghostty.

Yeah that’s a fresh one (17h as of time of writing), may land in libghostty soon !

Calculating the buffer size may not be so easy depending of chars used in lines :confounded_face:, plain ASCII weight less than fancy UTF-8 :rofl:
At least there is some workaround until it is patched upstream !

Until then, I think that’s better to extensively use less or similar programs to be sure :face_savoring_food:

Best Regards,
Nicolas.

@stefan_koell

I almost forgot to confirm that the patch mitigates the issue, will see on the long run how it goes until the upstream libghostty patch!

cheers,
Nicolas.