fix cursor wrap problem

fixes #6
Merge pull request #7 from LiquidHelium/wrap-fix

fix cursor wrap problem