We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1aa0a85 + 56a3798 commit e204002Copy full SHA for e204002
aztec/src/main/kotlin/org/wordpress/aztec/formatting/IndentFormatter.kt
@@ -167,6 +167,9 @@ class IndentFormatter(editor: AztecText) : AztecFormatter(editor) {
167
* Checks whether any line of the selection can be outdented
168
*/
169
fun isOutdentAvailable(): Boolean {
170
+ if (selectionStart == -1) {
171
+ return false
172
+ }
173
val previousLineBreak = editableText.substring(0, selectionStart).lastIndexOf("\n")
174
if (previousLineBreak > 0 && selectionCanBeOutdented(previousLineBreak + 1, selectionStart)) {
175
return true
0 commit comments