diff --git a/src/libneochat/chatkeyhelper.cpp b/src/libneochat/chatkeyhelper.cpp index 8dce03b79..3d68d34fd 100644 --- a/src/libneochat/chatkeyhelper.cpp +++ b/src/libneochat/chatkeyhelper.cpp @@ -190,6 +190,11 @@ bool ChatKeyHelper::insertReturn(Qt::KeyboardModifiers modifiers) return false; } + // If we are not a heading or are in a list just pass enter as normal. + if (cursor.blockFormat().headingLevel() <= 0 || cursor.currentList()) { + return false; + } + // If there was a heading we always want to revert to Paragraph format. auto newBlockFormat = RichFormat::blockFormatForFormat(RichFormat::Paragraph); auto newCharFormat = cursor.charFormat();