(editor: Editor, line: number, col: number)
| 3315 | describe("Sticky column", () => { |
| 3316 | // Helper: position cursor at a specific line and column |
| 3317 | function positionCursor(editor: Editor, line: number, col: number): void { |
| 3318 | // Go to line 0 first |
| 3319 | for (let i = 0; i < 20; i++) editor.handleInput("\x1b[A"); |
| 3320 | // Go to target line |
| 3321 | for (let i = 0; i < line; i++) editor.handleInput("\x1b[B"); |
| 3322 | // Go to target col |
| 3323 | editor.handleInput("\x01"); // Ctrl+A |
| 3324 | for (let i = 0; i < col; i++) editor.handleInput("\x1b[C"); |
| 3325 | } |
| 3326 | |
| 3327 | it("preserves target column when moving up through a shorter line", () => { |
| 3328 | const editor = new Editor(createTestTUI(), defaultEditorTheme); |
no test coverage detected