Commit a096530f authored by Jake Goldsborough's avatar Jake Goldsborough

find next occurrence when current cursor is equal to the searched char

parent 39958c53
......@@ -144,10 +144,12 @@ impl Editor {
for (i, ch) in self.buffers.current_buffer()[self.y()].chars().skip(x).enumerate() {
if ch == c {
dn += 1;
if dn == n {
x += i;
return Some(x);
if i > 0 {
dn += 1;
if dn == n {
x += i;
return Some(x);
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment