Commit ddfd46b3 authored by mae's avatar mae

nicer (un)comment selection, avoid C-style selections when you can do C++ style.

parent 6adb3f61
......@@ -744,7 +744,8 @@ void CPPEditor::unCommentSelection()
QString endText = endBlock.text();
int endPos = end - endBlock.position();
bool hasTrailingCharacters = !endText.mid(endPos).trimmed().isEmpty();
bool hasTrailingCharacters = !endText.left(endPos).remove(QLatin1String("//")).trimmed().isEmpty()
&& !endText.mid(endPos).trimmed().isEmpty();
if ((endPos <= endText.length() - 2
&& endText.at(endPos) == QLatin1Char('*')
&& endText.at(endPos+1) == QLatin1Char('/'))) {
......
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