So there's a problem here where you're mixing two coordinate spaces. These `getDestinationRows` are done with screen rows but you're setting the cursor position using `setCursorBufferPosition`. This will break if a user has softwraps or folds enabled.