only set the cursor if it has changed

this was verbally +1ed by @kristjan