Use Cursor::onDidChangePosition
Remove calls to deprecated cursor/selection methods