Skip to content

Commit

Permalink
Add comment in lieu of test coverage for now
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Aug 13, 2023
1 parent f82e00d commit 7375f7a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/handlers/grep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ impl<'b> GrepLine<'b> {
let old_len = self.code.len();
self.code = tabs::expand(&self.code, tab_cfg).into();
let shift = self.code.len().saturating_sub(old_len);
// HACK: it is not necessarily the case that all submatch coordinates
// should be shifted in this way. It should be true in a common case of:
// (a) the only tabs were at the beginning of the line, and (b) the user
// was not searching for tabs.
self.submatches = self.submatches.as_ref().map(|submatches| {
submatches
.iter()
Expand Down

0 comments on commit 7375f7a

Please sign in to comment.