Fix curor offset off-by-one

References #27.