Add display line filter bar for file compare window#3374
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a display line filter bar to the file compare window, extending the existing filter-expression engine with line/column-aware fields and helper UI for composing line filters.
Changes:
- Adds line filter bar UI, menus, dialog helpers, and file-compare integration.
- Extends filter expressions with line/column providers,
none, trim/statistics/match functions, and line-oriented tests. - Refactors shared filter menu helpers and updates project/resource wiring.
Reviewed changes
Copilot reviewed 43 out of 45 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
| Testing/GoogleTest/UnitTests/UnitTests.vcxproj.filters | Project filter metadata update. |
| Testing/GoogleTest/UnitTests/UnitTests.vcxproj | Project metadata update. |
| Testing/GoogleTest/FilterEngine/FilterExpression_test.cpp | Adds tests for line attributes and new filter functions. |
| Src/resource.h | Adds resource and command IDs for line filter UI. |
| Src/PropCompareFolder.cpp | Updates directive extraction API usage. |
| Src/MergeEditView.h | Adds display-filter commands and column tracking. |
| Src/MergeEditView.cpp | Adds context-menu integration for display filters and column filters. |
| Src/MergeEditFrm.h | Adds line filter bar ownership and handlers. |
| Src/MergeEditFrm.cpp | Implements file-compare filter bar show/hide/menu behavior. |
| Src/MergeDoc.h | Makes merge doc a line data provider and adds display-filter state. |
| Src/MergeDoc.cpp | Applies display filters during line hiding and exposes line data. |
| Src/Merge.vcxproj.filters | Adds new source/header files to VS filters. |
| Src/Merge.vcxproj | Adds new source/header files to the build. |
| Src/Merge.rc | Adds menus/dialog resources for display line filters. |
| Src/MatchInsideDlg.h | Adds match-inside/outside dialog declaration. |
| Src/MatchInsideDlg.cpp | Implements match-inside/outside filter dialog. |
| Src/LineFilterHelperMenu.h | Adds line filter menu helper declaration. |
| Src/LineFilterHelperMenu.cpp | Implements line filter menu expression generation. |
| Src/LineFilterHelper.h | Adds line-filter expression helper API. |
| Src/LineFilterHelper.cpp | Implements line-filter expression parsing/building helpers. |
| Src/LineFilterBar.h | Adds file-compare line filter bar declaration. |
| Src/LineFilterBar.cpp | Implements file-compare line filter bar UI behavior. |
| Src/FilterMenuHelpers.h | Extracts shared recursive menu helper utilities. |
| Src/FilterEngine/ILineDataProvider.h | Defines line/column data provider interface. |
| Src/FilterEngine/FunctionNodeProperty.cpp | Updates property functions for new eval context. |
| Src/FilterEngine/FilterParser.y | Adds none literal grammar support. |
| Src/FilterEngine/FilterParser.out | Regenerated parser output for none. |
| Src/FilterEngine/FilterParser.h | Updates parser token IDs. |
| Src/FilterEngine/FilterLexer.re | Adds none/undefined tokens. |
| Src/FilterEngine/FilterExpressionNodes.h | Updates node eval context and adds none literal/function declarations. |
| Src/FilterEngine/FilterExpression.h | Adds line eval context, shared context, and directive helpers. |
| Src/FilterEngine/FilterExpression.cpp | Implements new eval context and directive helper APIs. |
| Src/FilterEngine/FilterEngine.vcxitems.filters | Adds line provider header to shared filters. |
| Src/FilterEngine/FilterEngine.vcxitems | Adds line provider header to shared project items. |
| Src/FilterConditionDlg.cpp | Extends condition dialog for line/column/date-time filters. |
| Src/FileFilterHelperMenu.cpp | Reuses shared menu helpers and renamed condition IDs. |
| Src/DirFrame.h | Renames display filter bar member/handler for consistency. |
| Src/DirFrame.cpp | Updates directory filter bar member/handler names. |
| Src/DirFilterBar.h | Renames filter bar members/methods for consistency. |
| Src/DirFilterBar.cpp | Updates directory filter bar implementation names. |
| Src/Common/unicoder.h | Adds UTF-8 conversion overload for character ranges. |
| Src/Common/unicoder.cpp | Implements UTF-8 conversion overload. |
| Src/ClipboardHistory.cpp | Silences coroutine deprecation warning before WinRT includes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…s check' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
a420444 to
b7472c1
Compare
Member
Author
|
@copilot resolve the merge conflicts in this pull request |
…y-filter # Conflicts: # Docs/Manual/Spanish/Configuration.xml # Docs/Manual/Spanish/Filters.xml # Translations/Docs/Manual/Spanish.po
Contributor
Done. I resolved the merge conflicts and finalized the merge commit in |
sdottaka
added a commit
that referenced
this pull request
May 24, 2026
Marcellomco
added a commit
to Marcellomco/winmerge
that referenced
this pull request
May 24, 2026
Added translation for "Add display line filter bar for file compare window (WinMerge#3374)"
Merged
sdottaka
pushed a commit
that referenced
this pull request
May 24, 2026
Added translation for "Add display line filter bar for file compare window (#3374)"
Merged
sdottaka
added a commit
that referenced
this pull request
May 26, 2026
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.
Add Display Line Filter Feature
Adds a display line filter bar to the File Compare window, allowing users to control which lines are visible without affecting the comparison result.
Changes
New Features
Line,LineLength,LineNumber,LineFlags,EOL,EOLStr, etc.matchContext(),matchNumber(),matchBlockNumber(),matchBlockCount(),matchInside(), etc.Improvements to Filter Expression Engine
EvalContexttoFilterEvalContext, addingILineDataProviderandFilterSharedContextfor line-level evaluationnoneliteraltrim(),trimLeft(),trimRight(),strCount(),strFind(),regexCount(),regexFind(),regexExtract()string functionsEOL/EOLStrattributes for file and line comparisonParseDateTime()supporting additional date formats (YYYY-MM-DDetc.)Code Refactoring
CFilterHelperMenuBaseas a base class shared byCFileFilterHelperMenuandCLineFilterHelperMenuFilterMenuHelpersnamespaceLineFilterHelper,LineFilterBar,ReplaceListHelperas separate modulesNotes
matchInside()evaluation is line-based; multiple/*or*/occurrences within a single line are not distinguishedExamples
Screenshots