diff options
author | Dan Davison <dandavison7@gmail.com> | 2023-08-13 17:28:38 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2023-08-13 17:28:38 -0400 |
commit | 7375f7a165dabe430e12d531fedd84bb3a027c6b (patch) | |
tree | 98ee4cd67ef6c228d2279a92813f970a4d7d44af | |
parent | f82e00dee3491f1da333f44a35fbbebb5940128b (diff) |
Add comment in lieu of test coverage for now
-rw-r--r-- | src/handlers/grep.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/handlers/grep.rs b/src/handlers/grep.rs index 8c3b6ce8..ecfc7e2a 100644 --- a/src/handlers/grep.rs +++ b/src/handlers/grep.rs @@ -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() |