Commit d87f3d53 authored by hjk's avatar hjk

CppEditor: Make the string auto-string splitting less eager

It was already triggering when inserting a new line in a .qdoc file
such as /data/dev/creator-3.3/doc/src/howto/creator-help.qdoc. In that
case, tokens() was empty, but prevState == 5 (T_DOXY_COMMENT).

Change-Id: I445d4df14182b0b536181588a224917a814a3f7f
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 4d02144b
......@@ -103,7 +103,7 @@ static bool isInStringHelper(const QTextCursor &cursor, Token *retToken = 0)
const unsigned pos = cursor.selectionEnd() - cursor.block().position();
if (tokens.isEmpty() || pos < tokens.first().utf16charsBegin())
return prevState > 0;
return false;
if (pos >= tokens.last().utf16charsEnd()) {
const Token tk = tokens.last();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment