Skip to content

Commit

Permalink
handle scroll bottom buffer in renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
joetannenbaum committed Sep 26, 2023
1 parent 268cb2f commit d7db85f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Themes/Default/TextareaPromptRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,14 @@ public function __invoke(TextareaPrompt $prompt): string

protected function renderText(TextareaPrompt $prompt): string
{
$visible = collect($prompt->visible());

while ($visible->count() < $prompt->scroll) {
$visible->push('');
}

return $this->scrollbar(
collect($prompt->visible()),
$visible,
$prompt->firstVisible,
$prompt->scroll,
count($prompt->lines()),
Expand Down

0 comments on commit d7db85f

Please sign in to comment.