Commit 5e50c9d9 authored by ticki's avatar ticki

Merge pull request #49 from rjgoldsborough/next-ocur-on-same-char

find next occurrence when current cursor is equal to the searched char
parents 837b8986 a096530f
......@@ -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