Attempted to improve cursor setting logic in edit tool as the cursor is
sometimes not updated correctly.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>