summaryrefslogtreecommitdiff
path: root/internal/server/handlers/readcommand.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-06-17 14:12:24 +0300
committerPaul Buetow <paul@buetow.org>2025-06-17 14:12:24 +0300
commitb2cb4ca0563cc73af20460fe3b319263a96a6989 (patch)
tree0ab024e8983edcd8d25174b6da7749be15c8f9a9 /internal/server/handlers/readcommand.go
parent069dff93d8c6c8f0ba28d9f6123fa9b1430c2f92 (diff)
Fix grep context lines bug in channelless implementation
- Fixed critical bug where matching lines were incorrectly treated as after context - After context logic now only applies to non-matching lines, not matches - Consecutive matches no longer interfere with after context counting - All grep context options now work correctly: --before, --after, --max - TestDGrepContext1 and TestDGrepContext2 now pass with channelless implementation - Full compatibility with original channel-based behavior maintained - All integration tests passing The bug was in GrepProcessor.ProcessLine() where any line with afterRemaining > 0 was treated as after context, including matching lines. Fixed by moving after context logic inside the !isMatch condition block. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'internal/server/handlers/readcommand.go')
0 files changed, 0 insertions, 0 deletions