egslava
private fun backspace() = if (selection) { delete(start, end) // remove selection } else if (start > 0) { delete(start - 1, end) // remove current and back caret } else null