mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-24 16:11:43 +00:00
Remove internal surface prompt query
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user