(input: string, key: any)
| 605 | }; |
| 606 | |
| 607 | const handleNewLine = (input: string, key: any): boolean => { |
| 608 | if (input === "\r" || input === "\\\r") { |
| 609 | const handled = textBuffer.handleInput("\n", key); |
| 610 | if (handled) { |
| 611 | const newText = textBuffer.text; |
| 612 | const newCursor = textBuffer.cursor; |
| 613 | setInputText(newText); |
| 614 | setCursorPosition(newCursor); |
| 615 | updateSlashCommandState(newText, newCursor); |
| 616 | updateFileSearchState(newText, newCursor); |
| 617 | } |
| 618 | return true; |
| 619 | } |
| 620 | return false; |
| 621 | }; |
| 622 | |
| 623 | const handleEscapeKey = (key: any): boolean => { |
| 624 | if (!key.escape) return false; |
no test coverage detected