Improve cursor line behavior