fix: prevent find_in_file from removing the last char of a match string
This commit is contained in:
parent
fd648b7b07
commit
c83d9387ef
1 changed files with 1 additions and 1 deletions
|
@ -236,7 +236,7 @@ const Process = struct {
|
||||||
} else return;
|
} else return;
|
||||||
if (path) |p| {
|
if (path) |p| {
|
||||||
const match_text = if (lines) |l|
|
const match_text = if (lines) |l|
|
||||||
if (l[l.len - 1] == '\n') l[0 .. l.len - 2] else l
|
if (l[l.len - 1] == '\n') l[0 .. l.len - 1] else l
|
||||||
else
|
else
|
||||||
"";
|
"";
|
||||||
try self.parent.send(.{ self.tag, p, line, begin, line, end, match_text });
|
try self.parent.send(.{ self.tag, p, line, begin, line, end, match_text });
|
||||||
|
|
Loading…
Add table
Reference in a new issue