Restore bracketed paste mode after external editor exit (#13606)

This commit is contained in:
Tommaso Sciortino
2025-11-21 13:20:37 -08:00
committed by GitHub
parent 9f9a2fa844
commit 1e715d1e5c
4 changed files with 30 additions and 6 deletions

View File

@@ -0,0 +1,18 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { writeToStdout } from '@google/gemini-cli-core';
const ENABLE_BRACKETED_PASTE = '\x1b[?2004h';
const DISABLE_BRACKETED_PASTE = '\x1b[?2004l';
export const enableBracketedPaste = () => {
writeToStdout(ENABLE_BRACKETED_PASTE);
};
export const disableBracketedPaste = () => {
writeToStdout(DISABLE_BRACKETED_PASTE);
};