(options: TextBufferStateOptions)
| 116 | } |
| 117 | |
| 118 | export function updateTextBufferState(options: TextBufferStateOptions) { |
| 119 | const { |
| 120 | handled: _handled, |
| 121 | textBuffer, |
| 122 | setInputText, |
| 123 | setCursorPosition, |
| 124 | updateSlashCommandState, |
| 125 | updateFileSearchState, |
| 126 | updateBashModeState, |
| 127 | inputHistory, |
| 128 | } = options; |
| 129 | |
| 130 | // Skip state updates during rapid input mode to avoid conflicts with timer-based updates |
| 131 | if (!textBuffer.isInRapidInputMode()) { |
| 132 | const newText = textBuffer.text; |
| 133 | const newCursor = textBuffer.cursor; |
| 134 | setInputText(newText); |
| 135 | setCursorPosition(newCursor); |
| 136 | updateSlashCommandState(newText, newCursor); |
| 137 | updateFileSearchState(newText, newCursor); |
| 138 | updateBashModeState(newText); |
| 139 | inputHistory.resetNavigation(); |
| 140 | } |
| 141 | } |
no test coverage detected