Qt: cleanup syntax_highlighter a bit

This commit is contained in:
Megamouse 2018-06-12 11:17:17 +02:00 committed by Ivan
parent 79dd62cda2
commit ddded7ba5c
3 changed files with 2 additions and 9 deletions

View file

@ -557,9 +557,6 @@
<ClCompile Include="rpcs3qt\msg_dialog_frame.cpp"> <ClCompile Include="rpcs3qt\msg_dialog_frame.cpp">
<Filter>Gui\message dialog</Filter> <Filter>Gui\message dialog</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="rpcs3qt\syntax_highlighter.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="evdev_joystick_handler.cpp"> <ClCompile Include="evdev_joystick_handler.cpp">
<Filter>Io\evdev</Filter> <Filter>Io\evdev</Filter>
</ClCompile> </ClCompile>
@ -831,9 +828,6 @@
<CustomBuild Include="rpcs3qt\msg_dialog_frame.h"> <CustomBuild Include="rpcs3qt\msg_dialog_frame.h">
<Filter>Gui\message dialog</Filter> <Filter>Gui\message dialog</Filter>
</CustomBuild> </CustomBuild>
<CustomBuild Include="rpcs3qt\syntax_highlighter.h">
<Filter>Generated Files</Filter>
</CustomBuild>
<CustomBuild Include="rpcs3qt\save_manager_dialog.h"> <CustomBuild Include="rpcs3qt\save_manager_dialog.h">
<Filter>Gui\save</Filter> <Filter>Gui\save</Filter>
</CustomBuild> </CustomBuild>

View file

@ -45,8 +45,7 @@ void Highlighter::highlightBlock(const QString &text)
} }
else else
{ {
commentLength = endIndex - startIndex commentLength = endIndex - startIndex + match.capturedLength();
+ match.capturedLength();
} }
setFormat(startIndex, commentLength, multiLineCommentFormat); setFormat(startIndex, commentLength, multiLineCommentFormat);
startIndex = text.indexOf(commentStartExpression, startIndex + commentLength); startIndex = text.indexOf(commentStartExpression, startIndex + commentLength);