We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1aa0a85 commit 56a3798Copy full SHA for 56a3798
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