Fix `split-selection-into-lines` 

Don’t create cursor on last row when selection on row is empty


Fixes #1704
Closes #3080