feat: replace large text pastes with [Pasted Text: X lines] placeholder (#16422)

This commit is contained in:
Jack Wotherspoon
2026-01-21 21:09:24 -05:00
committed by GitHub
parent 27d21f9921
commit 75e4f492ab
7 changed files with 619 additions and 28 deletions

View File

@@ -34,6 +34,7 @@ const createTestState = (
viewportHeight: 24,
transformationsByLine: [[]],
visualLayout: defaultVisualLayout,
pastedContent: {},
});
describe('vim-buffer-actions', () => {
@@ -904,7 +905,9 @@ describe('vim-buffer-actions', () => {
it('should preserve undo stack in operations', () => {
const state = createTestState(['hello'], 0, 0);
state.undoStack = [{ lines: ['previous'], cursorRow: 0, cursorCol: 0 }];
state.undoStack = [
{ lines: ['previous'], cursorRow: 0, cursorCol: 0, pastedContent: {} },
];
const action = {
type: 'vim_delete_char' as const,