Simplify paste handling (#16654)

This commit is contained in:
Tommaso Sciortino
2026-01-14 13:27:36 -08:00
committed by GitHub
parent 41369f67eb
commit 94d5ae541e
22 changed files with 25 additions and 97 deletions

View File

@@ -396,11 +396,11 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
// We should probably stop supporting paste if the InputPrompt is not
// focused.
/// We want to handle paste even when not focused to support drag and drop.
if (!focus && !key.paste) {
if (!focus && key.name !== 'paste') {
return;
}
if (key.paste) {
if (key.name === 'paste') {
// Record paste time to prevent accidental auto-submission
if (!isTerminalPasteTrusted(kittyProtocol.enabled)) {
setRecentUnsafePasteTime(Date.now());