Repository navigation
Find and Replace: search only the selected range (#3224) - #3254
Merged
Merged
Conversation
edit.find and edit.replace take within: selection, which searches only the selected cells; Find Next then moves the active cell through them and keeps the range selected, as Excel does. The Find and Replace dialog uses it whenever more than one cell is selected (Excel searches a selected range; one selected cell still means the whole sheet). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
h-a-n-a-s-h-i
pushed a commit
that referenced
this pull request
Nov 3, 2026
- #3223: sniff the first 64 KiB for a web page and skip JSON and files over the text-import cap, so every CSV/TSV is no longer decoded in full before the size check. - #3253: SYLK relative offsets use checked arithmetic (no overflow on R[9223372036854775807]); at most 1024 column-width records are kept; regression test. - #3254: a single selected merged cell searches the whole sheet, as one selected cell does. - #3252: the formula bar's height cap is half the room below the ribbon, not half the window, so the worksheet stays visible in a short window (CodeRabbit Major). - #3239, #3244, #3252, #3268: es/de/cs/zh/ko/ru/pt entries for the new interface strings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Merged — thank you @hectorviov for the contribution! I added one review fix on main (865a789): a single selected merged cell searches the whole sheet, as one selected cell does in Excel. |
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.
Fixes #3224
What changed
Engine.
edit.findandedit.replacetake a new scope,within: "selection", which searches only the selected cells of the active sheet:sheetandworkbookbehave as before.Find and Replace dialog. When more than one cell is selected and Within workbook is off, the dialog searches the selection, as Excel does. With one cell selected it still searches the whole sheet.
Three-way comparison
B1:B3 selected; "pear" in A1, B1, A3 and B3:
Excel's side comes from Microsoft's Find and Replace documentation. It says to select a range of cells to search only that range and to select any one cell to search the whole sheet, and some versions offer Within ▸ Selection. I didn't drive Excel's dialog for this.
Tests
cmd::edit::tests::find_and_replace_within_the_selectioncovers Find All, three Find Next steps (with the wrap and the selection kept), a miss outside the range, Replace inside the range only, and the sheet scope unchanged.find_dialog_focus::find_all_with_a_range_selected_searches_only_the_rangedrives the dialog (Ctrl+F, type, Find All) with a range selected and with a single cell selected.cargo xtask cipasses.Anything a reviewer should look at first
within: selection) for scripts and agents. The dialog chooses it from the selection, like Excel's desktop dialog, so there's no extra control to set.🤖 Generated with Claude Code