- fix: don't highlight '#' with spaces preceeding it as error
This commit is contained in:
parent
4eec5cafb8
commit
e51473fdde
1
NEWS.md
1
NEWS.md
|
@ -5,6 +5,7 @@ Version 0.7.0
|
||||||
- enhancement: new file template
|
- enhancement: new file template
|
||||||
- fix: when an editor is created, its caret will be displayed even it doesn't have focus
|
- fix: when an editor is created, its caret will be displayed even it doesn't have focus
|
||||||
- enhancement: set mouse wheel scroll speed in the editor general option tab ( 3 lines by default)
|
- enhancement: set mouse wheel scroll speed in the editor general option tab ( 3 lines by default)
|
||||||
|
- fix: don't highlight '#' with spaces preceeding it as error
|
||||||
|
|
||||||
Version 0.6.8
|
Version 0.6.8
|
||||||
- enhancement: add link to cppreference in the help menu
|
- enhancement: add link to cppreference in the help menu
|
||||||
|
|
|
@ -409,7 +409,8 @@ void SynEditCppHighlighter::commaProc()
|
||||||
|
|
||||||
void SynEditCppHighlighter::directiveProc()
|
void SynEditCppHighlighter::directiveProc()
|
||||||
{
|
{
|
||||||
if (mLine[0]!='#') { // '#' is not first char on the line, treat it as an invalid char
|
QString preContents = mLineString.left(mRun).trimmed();
|
||||||
|
if (!preContents.isEmpty()) { // '#' is not first non-space char on the line, treat it as an invalid char
|
||||||
mTokenId = TokenKind::Unknown;
|
mTokenId = TokenKind::Unknown;
|
||||||
mRun+=1;
|
mRun+=1;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue