mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-31 20:59:02 +00:00
lib-vt: move scrollback limits to terminal_set
Terminal construction previously accepted GhosttyTerminalOptions with dimensions and one scrollback byte limit. Remove the options struct from the ABI and make ghostty_terminal_new accept columns and rows directly. Add byte and line limit options to ghostty_terminal_set and forward them to the runtime Terminal setters. NULL removes a limit, while zero bytes disables scrollback. Update type metadata, tests, and all API examples.
This commit is contained in:
@@ -6,12 +6,7 @@
|
||||
int main() {
|
||||
// Create a terminal
|
||||
GhosttyTerminal terminal;
|
||||
GhosttyTerminalOptions opts = {
|
||||
.cols = 80,
|
||||
.rows = 24,
|
||||
.max_scrollback = 0,
|
||||
};
|
||||
GhosttyResult result = ghostty_terminal_new(nullptr, &terminal, opts);
|
||||
GhosttyResult result = ghostty_terminal_new(nullptr, &terminal, 80, 24);
|
||||
assert(result == GHOSTTY_SUCCESS);
|
||||
|
||||
// Feed VT data into the terminal
|
||||
|
||||
Reference in New Issue
Block a user