Add find and replace support in Search Panel#658
Merged
Conversation
chrisgregan
added a commit
that referenced
this pull request
Mar 19, 2026
* Initial implementation of replace all in file * Replace single match item * Center align buttons * Rename to ReplaceMode * Fix string concatenation * Improve text replace UX * Update navigate to result for multiline * Implement find-replace * Collapse large search results to improve responsiveness * Make file header selectable * Persist search and replace history in workspace settings * Added tests for TextReplacer service * Misc tidy ups * Refactor SearchPanelViewModel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces new text editing and replacement functionality, including batch text edits, and adds comprehensive unit tests for these features. It also updates localization strings to support the new replace operations and improves search panel status messages. Additionally, it includes documentation and naming improvements for clarity and consistency.
Fixes #657
Text editing and replacement functionality:
TextEditandDocumentEditrecord types and theIApplyEditsCommandinterface to support batch text edits for documents, including insert, delete, and replace operations. (app/Core/Celbridge.Foundation/Documents/IApplyEditsCommand.cs)ApplyEditsAsyncmethod to theIDocumentViewinterface to apply a batch of text edits as a single undo unit. (app/Core/Celbridge.Foundation/Documents/IDocumentView.cs)GetDocumentViewmethod to theIDocumentsPanelinterface to retrieve an open document view by resource. (app/Core/Celbridge.Foundation/Documents/IDocumentsPanel.cs)Unit tests for text editing and replacement:
TextEditTestscovering insert, delete, replace, and document edit scenarios. (app/Celbridge.Tests/Documents/TextEditTests.cs)TextReplacerTestsproviding thorough coverage of text replacement operations, including edge cases and line ending preservation. (app/Celbridge.Tests/Search/TextReplacerTests.cs)Localization and UI improvements:
app/Celbridge/Resources/Strings/en-US/Resources.resw) [1] [2] [3]Test and documentation improvements:
app/Celbridge.Tests/Markdown/MarkdownDocumentViewModelTests.cs)DocumentSaveCompletedMessageis sent and improved code style guidelines for class structure. (app/Core/Celbridge.Foundation/Documents/DocumentMessages.cs,app/.github/copilot-instructions.md) [1] [2]Configuration and naming consistency:
app/Celbridge/appsettings.development.json)