Restore keyboard mode when exiting the editor (#13350)

This commit is contained in:
Tommaso Sciortino
2025-11-19 11:37:30 -08:00
committed by GitHub
parent 3f8d636501
commit 84573992b4
6 changed files with 57 additions and 50 deletions

View File

@@ -20,6 +20,7 @@ import {
import type { Key } from '../../contexts/KeypressContext.js';
import type { VimAction } from './vim-buffer-actions.js';
import { handleVimAction } from './vim-buffer-actions.js';
import { enableSupportedProtocol } from '../../utils/kittyProtocolDetector.js';
export type Direction =
| 'left'
@@ -1891,6 +1892,7 @@ export function useTextBuffer({
} catch (err) {
console.error('[useTextBuffer] external editor error', err);
} finally {
enableSupportedProtocol();
if (wasRaw) setRawMode?.(true);
try {
fs.unlinkSync(filePath);