Fix cursor position handling on column change

Fixes issue #236.