mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-21 11:30:38 -07:00
Restore bracketed paste mode after external editor exit (#13606)
This commit is contained in:
committed by
GitHub
parent
9f9a2fa844
commit
1e715d1e5c
18
packages/cli/src/ui/utils/bracketedPaste.ts
Normal file
18
packages/cli/src/ui/utils/bracketedPaste.ts
Normal 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);
|
||||
};
|
||||
Reference in New Issue
Block a user