diff --git a/lib/src/widgets/controller.dart b/lib/src/widgets/controller.dart index 2826e3f6..0780b9ea 100644 --- a/lib/src/widgets/controller.dart +++ b/lib/src/widgets/controller.dart @@ -122,14 +122,13 @@ class QuillController extends ChangeNotifier { formatSelection(Attribute.clone(Attribute.indentL1, null)); return; } - if (isIncrease && indent.value < 5) { - formatSelection(Attribute.getIndentLevel(indent.value + 1)); - return; - } - if (indent.value > 0) { - formatSelection(Attribute.getIndentLevel(indent.value - 1)); + if (isIncrease) { + if (indent.value < 5) { + formatSelection(Attribute.getIndentLevel(indent.value + 1)); + } return; } + formatSelection(Attribute.getIndentLevel(indent.value - 1)); } void _indentSelectionEachLine(bool isIncrease) {