diff options
Diffstat (limited to 'src/plugins/texteditor')
-rw-r--r-- | src/plugins/texteditor/texteditor.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 749e7bf2f7f..7a8fa1edbce 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -4975,7 +4975,7 @@ static QColor calcBlendColor(const QColor &baseColor, int level, int count) if (level == count - 1) return color90; - const int blendFactor = level * (256 / (count - 2)); + const int blendFactor = level * (256 / (count - 1)); return blendColors(color80, color90, blendFactor); } @@ -7471,8 +7471,7 @@ void TextEditorWidgetPrivate::handleBackspaceKey() } } } else if (typingSettings.m_smartBackspaceBehavior == TypingSettings::BackspaceUnindents) { - const QChar previousChar = q->document()->characterAt(pos - 1); - if (!(previousChar == QLatin1Char(' ') || previousChar == QLatin1Char('\t'))) { + if (c.positionInBlock() > TabSettings::firstNonSpace(c.block().text())) { if (cursorWithinSnippet) c.beginEditBlock(); c.deletePreviousChar(); |