ghostty_paste_is_safe function
Check if paste data is safe to paste into the terminal.
Data is considered unsafe if it contains:
- Newlines (
\n) which can inject commands - The bracketed paste end sequence (
\x1b[201~) which can be used to exit bracketed paste mode and inject commands
This check is conservative and considers data unsafe regardless of current terminal state.
@param data The paste data to check (must not be NULL) @param len The length of the data in bytes @return true if the data is safe to paste, false otherwise
Implementation
@ffi.Native<ffi.Bool Function(ffi.Pointer<ffi.Char>, ffi.Size)>()
external bool ghostty_paste_is_safe(ffi.Pointer<ffi.Char> data, int len);