Fix: Position is incorrect on OSX and Linux

If there are characters other than ASCII in a line, the position of ruler(s) could be a float.