From cc7c696cd0772e466da403eb4e3f00f4e8d8ae1e Mon Sep 17 00:00:00 2001 From: Can Celik Date: Sat, 19 Sep 2026 14:47:18 +0300 Subject: feat: add configurable pane screen and scrollback clearing (#4383) --- vendor/libghostty-vt/include/ghostty/vt/terminal.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'vendor/libghostty-vt/include/ghostty/vt') diff --git a/vendor/libghostty-vt/include/ghostty/vt/terminal.h b/vendor/libghostty-vt/include/ghostty/vt/terminal.h index ad5eec54..81f9ebd0 100644 --- a/vendor/libghostty-vt/include/ghostty/vt/terminal.h +++ b/vendor/libghostty-vt/include/ghostty/vt/terminal.h @@ -2007,6 +2007,14 @@ GHOSTTY_API void ghostty_terminal_free(GhosttyTerminal terminal); */ GHOSTTY_API void ghostty_terminal_reset(GhosttyTerminal terminal); +/** + * Clear screen and history, retaining the cursor's soft-wrapped active line. + * Does not alter the VT parser or write to the child process. Returns false + * without changing the terminal on the alternate screen or for a NULL handle. + * Otherwise returns true and moves the retained line to the top of the screen. + */ +GHOSTTY_API bool ghostty_terminal_clear_screen(GhosttyTerminal terminal); + /** * Resize the terminal to the given dimensions. * -- cgit v1.2.3