From 8e2cfbf303a43bbd946279dd2cb394be82a782a0 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 12 May 2020 19:12:33 +0400 Subject: [PATCH] Insert only paragraph separators in the field. --- ui/widgets/input_fields.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/widgets/input_fields.cpp b/ui/widgets/input_fields.cpp index b049e38..69460f6 100644 --- a/ui/widgets/input_fields.cpp +++ b/ui/widgets/input_fields.cpp @@ -2689,6 +2689,8 @@ void InputField::keyPressEventInner(QKeyEvent *e) { const auto oldPosition = textCursor().position(); if (enter && ctrl) { e->setModifiers(e->modifiers() & ~Qt::ControlModifier); + } else if (enter && shift) { + e->setModifiers(e->modifiers() & ~Qt::ShiftModifier); } _inner->QTextEdit::keyPressEvent(e); auto cursor = textCursor();