Close cursor + Remove old references to @cursor (it's @state.cursor now) -- Related to #1569
Merge branch 'michel_1569_close_cursor' into next