Another bug fix after the refactor.

This commit is contained in:
Nathan Vegdahl 2020-02-17 07:42:23 +09:00
parent 3f0332b0ec
commit 6d5cb16ef3

View File

@ -122,7 +122,7 @@ impl LineFormatter {
// Check if we've found the horizontal position _and_ the passed
// char_idx on the same line, and return if so.
if i >= char_offset && hpos_char_idx != None {
if (i + char_count(&g)) > char_offset && hpos_char_idx != None {
return char_idx - char_offset + hpos_char_idx.unwrap();
}