Commit 4cdb8aaa authored by ssrq's avatar ssrq

[__line/state] Make sure the index match is at the beginning

Without the == 1 all lines which contain --line as a substring match.  e.g. if
--line is "line" and the file contains the line "wrong line" this was considered
a match.
parent 629d0795
......@@ -49,7 +49,7 @@ function _find(_text, _pattern) {
if (needle == "regex") {
return match(_text, _pattern)
} else {
return index(_text, _pattern)
return index(_text, _pattern) == 1
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment