vt: add total_rows and scrollback_rows to terminal get API

Add total_rows and scrollback_rows as new TerminalData variants
queryable through the existing ghostty_terminal_get interface,
using the cached O(1) total_rows field from PageList rather than
introducing standalone functions.
This commit is contained in:
Mitchell Hashimoto
2026-03-24 13:57:34 -07:00
parent 82f7527b30
commit 2c16c9e40c
2 changed files with 61 additions and 0 deletions

View File

@@ -556,6 +556,20 @@ typedef enum {
* Output type: GhosttyString *
*/
GHOSTTY_TERMINAL_DATA_PWD = 13,
/**
* The total number of rows in the active screen including scrollback.
*
* Output type: size_t *
*/
GHOSTTY_TERMINAL_DATA_TOTAL_ROWS = 14,
/**
* The number of scrollback rows (total rows minus viewport rows).
*
* Output type: size_t *
*/
GHOSTTY_TERMINAL_DATA_SCROLLBACK_ROWS = 15,
} GhosttyTerminalData;
/**