docs: show how to get whole scrollback in get_xxx_as_text

Folks often ask how to do this. Pre-empt the question.
This commit is contained in:
Wez Furlong 2024-01-27 11:05:43 -07:00
parent 2a8bdfa603
commit b2ae5ade79
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387
2 changed files with 9 additions and 0 deletions

View File

@ -19,3 +19,8 @@ Trailing blank lines are stripped, which may result in fewer lines being
returned than you might expect if the pane only had a couple of lines
of output.
To obtain the entire scrollback, you can do something like this:
```lua
pane:get_lines_as_text(pane:get_dimensions().scrollback_rows)
```

View File

@ -24,4 +24,8 @@ Trailing blank lines are stripped, which may result in fewer lines being
returned than you might expect if the pane only had a couple of lines
of output.
To obtain the entire scrollback, you can do something like this:
```lua
pane:get_logical_lines_as_text(pane:get_dimensions().scrollback_rows)
```