atiaomar1978-hub opened a new pull request, #25407: URL: https://github.com/apache/camel/pull/25407
## Summary Implements [CAMEL-24372](https://issues.apache.org/jira/browse/CAMEL-24372): enhanced plain-text edit mode in the camel-jbang TUI source viewer for YAML (and other local files). ### Editor features | Shortcut | Action | |----------|--------| | Ctrl+Z / Ctrl+Y / Ctrl+Shift+Z | Undo / redo | | Alt+↑ / Alt+↓ | Move YAML list block up/down | | Ctrl+D | Duplicate current block | | Ctrl+Shift+K | Delete current block | | Ctrl+/ | Toggle `#` comment on block | | Ctrl+← / Ctrl+→ | Word navigation | | Ctrl+Backspace / Ctrl+Delete | Delete word backward/forward | | Home | Smart home (content indent, then column 0) | | Ctrl+F, then n/N | Find in edit mode | ### Implementation - `SourceEditHistory` — snapshot-based undo/redo stack (max 100) - `YamlBlockEditor` — YAML list-item block detection and move/duplicate/delete/comment - `SourceEditorNavigation` — word boundaries and smart home - `SourceViewer` — key bindings, footer hints, find-while-editing via `SearchHighlighter` - `SearchHighlighter` — edit-mode find input/navigation, `closeInputOnly()`, `jumpToNearestMatch` on confirm ### Review follow-ups addressed - Fixed tamboui modifier key handling (`isKey(KeyCode.*)` instead of `isUp()`/`isLeft()`/`isDelete*()` with Ctrl/Alt) - Find-in-edit: `n`/`N` navigation aligned with view mode; Esc clears find; paste routes to find input; jump to nearest match after confirm - `moveBlockUp` cursor lands on the moved block after swap ### Tests - `YamlBlockEditorTest` — block find/move/duplicate/delete/comment - `SourceEditHistoryTest` — undo/redo stack behavior - `SourceEditorNavigationTest` — word nav and smart home - `SourceViewerEditorOpsTest` — integration via `SourceViewer` edit mode _AI-generated PR description on behalf of atiaomar1978-hub._ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
