egslava
02/24/2016, 2:57 PMprivate fun backspace() = if (editor.selectionStart == editor.selectionEnd) {
editor.text.delete(editor.selectionStart, editor.selectionEnd) // remove selection
} else if (editor.selectionStart > 0) {
editor.text.delete(editorSelection - 1, editor.selectionEnd) // remove current and back caret
} else null