From e7ddd2b80b1d132a18519c4bfad0a1549fbb92d4 Mon Sep 17 00:00:00 2001 From: Leandro Melo <leandro.melo@nokia.com> Date: Thu, 6 May 2010 11:34:11 +0200 Subject: [PATCH] Changed < for <= in Utils::unCommentSelection to catch cases where there are no characters (only a line end, for example) after the comment start mark. Ex.: /* void f();*/ --- src/libs/utils/uncommentselection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/utils/uncommentselection.cpp b/src/libs/utils/uncommentselection.cpp index facae876716..06fe12ce31f 100644 --- a/src/libs/utils/uncommentselection.cpp +++ b/src/libs/utils/uncommentselection.cpp @@ -154,7 +154,7 @@ void Utils::unCommentSelection(QPlainTextEdit *edit, const CommentDefinition &de start -= multiLineStartLength; } - bool hasSelStart = (startPos < startText.length() - multiLineStartLength + bool hasSelStart = (startPos <= startText.length() - multiLineStartLength && isComment(startText, startPos, definition, -- GitLab