From 21c11df4af4de9c0502cc659394f01df808453e4 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 13 Sep 2017 12:11:34 +0200 Subject: Fixed space after changing formatting --- framework/src/domain/documenthandler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/src/domain/documenthandler.cpp b/framework/src/domain/documenthandler.cpp index d9a17e34..b4ddc24c 100644 --- a/framework/src/domain/documenthandler.cpp +++ b/framework/src/domain/documenthandler.cpp @@ -299,6 +299,8 @@ void DocumentHandler::contentsChange(int position, int charsRemoved, int charsAd QTextCursor cursor = textCursor(); cursor.setPosition(position + charsAdded, QTextCursor::KeepAnchor); cursor.mergeCharFormat(*m_cachedTextFormat); + //This is somehow necessary, otherwise space can break in the editor. + cursor.setPosition(position + charsAdded, QTextCursor::MoveAnchor); } m_cachedTextFormat = {}; } -- cgit v1.2.3