From c80c3736275412a0cf75588fb6b7e73fd9395fcd Mon Sep 17 00:00:00 2001 From: Vishal Kapur Date: Wed, 12 Aug 2026 13:24:21 -0700 Subject: [PATCH] Remove internal surface prompt query --- include/ghostty.h | 1 - src/Surface.zig | 11 ----------- src/apprt/embedded.zig | 5 ----- 3 files changed, 17 deletions(-) diff --git a/include/ghostty.h b/include/ghostty.h index efcd2901e..5523654c4 100644 --- a/include/ghostty.h +++ b/include/ghostty.h @@ -1134,7 +1134,6 @@ GHOSTTY_API ghostty_app_t ghostty_surface_app(ghostty_surface_t); GHOSTTY_API ghostty_surface_config_s ghostty_surface_inherited_config(ghostty_surface_t, ghostty_surface_context_e); GHOSTTY_API void ghostty_surface_update_config(ghostty_surface_t, ghostty_config_t); GHOSTTY_API bool ghostty_surface_needs_confirm_quit(ghostty_surface_t); -GHOSTTY_API bool ghostty_surface_is_at_prompt(ghostty_surface_t); GHOSTTY_API bool ghostty_surface_process_exited(ghostty_surface_t); GHOSTTY_API void ghostty_surface_refresh(ghostty_surface_t); GHOSTTY_API void ghostty_surface_draw(ghostty_surface_t); diff --git a/src/Surface.zig b/src/Surface.zig index be8cbde8f..7ef2038b8 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -967,17 +967,6 @@ pub fn needsConfirmQuit(self: *Surface) bool { }; } -/// True if the surface cursor is currently at a shell prompt according to -/// semantic prompt integration. If shell integration is unavailable, this -/// conservatively returns false. -pub fn isAtPrompt(self: *Surface) bool { - if (self.child_exited) return false; - - self.renderer_state.mutex.lockUncancelable(global.io()); - defer self.renderer_state.mutex.unlock(global.io()); - return self.io.terminal.cursorIsAtPrompt(); -} - /// Called from the app thread to handle mailbox messages to our specific /// surface. pub fn handleMessage(self: *Surface, msg: Message) !void { diff --git a/src/apprt/embedded.zig b/src/apprt/embedded.zig index 689a3e4dc..a380dc50c 100644 --- a/src/apprt/embedded.zig +++ b/src/apprt/embedded.zig @@ -1606,11 +1606,6 @@ pub const CAPI = struct { return surface.core_surface.needsConfirmQuit(); } - /// Returns true if the surface cursor is currently at a semantic prompt. - export fn ghostty_surface_is_at_prompt(surface: *Surface) bool { - return surface.core_surface.isAtPrompt(); - } - /// Returns true if the surface process has exited. export fn ghostty_surface_process_exited(surface: *Surface) bool { return surface.core_surface.child_exited;