Code::Blocks Forums
User forums => General (but related to Code::Blocks) => Topic started by: headkase on December 31, 2015, 06:28:47 am
-
Edit: Edited title with exact SVN.
See: Here (http://forums.codeblocks.org/index.php/topic,20813.0.html).
It seems that with SVN 10637 the default highlight mode for source code is defaulting to plain text files. Even after changing the mode and saving all. I did delete the APPDATA Code::Blocks settings and started fresh to make sure it wasn't in there.
-
What? Try to explain what the problem is better, please, at the moment it is hard to understand.
And please post in a single topic.
-
What? Try to explain what the problem is better, please, at the moment it is hard to understand.
And please post in a single topic.
Sorry, created this thread as I found the issue during troubleshooting a plugin but it is about the editor so I created a new thread.
* With SVN 10637, create a new C++ console project.
* The syntax highlighting is supposed to be C++, instead it defaults to plain text.
* Highlighting is chosen from the: Edit menu, Highlight Mode.
* Set C++ highlighting, save all, close C::B, restart, load project.
* highlighting back to plain text.
Compiler used is MinGW-Builds 5.3.0 32-bit.
-
Did some test compiles and narrowed down the issue:
* SVN 10633 correctly applies the appropriate code highlighting on opened files
* SVN 10634 defaults to plain text highlighting which is incorrect
Thanks,
Bill.
-
Works fine for me on linux.
Can someone else confirm that the issue happens?
-
Works fine for me on linux.
Can someone else confirm that the issue happens?
As always I will gladly apply and compile test patches. It's the least I can do for all the effort that is provided from the team at no monetary cost.
-
Here, this file may be useful:
https://www.dropbox.com/s/2ie4mkgwjzcfale/Highlight_Builds.7z?dl=0
It is both builds 10633 and 10634 as compiled on my own system using MinGW-Builds 5.3.0 32-bit. No contrib plugins, just the main project. Everything needed to run them (toolchain dll's) are included. If another Windows user does not have the issue with a different toolchain then it might be what I'm using.
-
* SVN 10633 correctly applies the appropriate code highlighting on opened files
* SVN 10634 defaults to plain text highlighting which is incorrect
I can reproduce on Windows. Lets have a look...
-
* SVN 10633 correctly applies the appropriate code highlighting on opened files
* SVN 10634 defaults to plain text highlighting which is incorrect
I can reproduce on Windows. Lets have a look...
@oBFusCATed: I think for now I would revert your commit becasue it really causes the issue and that is serious. Will you do it?
Edit: Oh, and btw: After your commit I have two times the plain text file option: Ones is called "plain text" and the other is "Plain Text Files". Why? Are you sure you didn't implement something that was already there? :-)
-
Did some test compiles and narrowed down the issue:
For now, please remove the lexer on Windows (lexer_plain.xml) then it should work again. I think the reason for the bug is simple: The file mask in the lexer (*) hits for all files. As the index (1) is the lowest index it will always "win" for all files. Thus, all files will be handled as "plain text". This surely it not what we want, isn't it? To me its weird that it works on Linux, because it should show the same effect. Or does "*" mean really just a file w/o extension?
-
For now, please remove the lexer on Windows (lexer_plain.xml) then it should work again.
Yes, removing that file restores correct behavior without doing any other change. Thanks.
-
To me its weird that it works on Linux, because it should show the same effect. Or does "*" mean really just a file w/o extension?
Probably on my machine or on linux the plain text lexer is loaded after the other lexers. So it is added to the end of the list of lexers.
-
Edit: Oh, and btw: After your commit I have two times the plain text file option: Ones is called "plain text" and the other is "Plain Text Files". Why? Are you sure you didn't implement something that was already there? :-)
Nope I see only "Plain Text Files" in the combo box. But I see the "Plain text" menu option in the Highlight menu.
So I guess there is more work to do about this patch.
And obviously I was right that this change is not safe for 15.12 :)
-
Hey guys,
So I had the same bug, good to know it is not from my side.
But I have another question concerning the syntax hightlight when I build from source : is it normal the members of classes are not highlighted ? Because on C::B 13.12 they are highlighted in purple (default theme color).
Thanks again for the great work you do with C::B :D !
-
But I have another question concerning the syntax hightlight when I build from source : is it normal the members of classes are not highlighted ? Because on C::B 13.12 they are highlighted in purple (default theme color).
This is controlled by Settings->Editor->Code Completion->pseudo semantic keyword highlighting.
@devs: Some of the options there are "Disable xyz", and some are "Enable xyz"... this is kind of confusing.
-
But I have another question concerning the syntax hightlight when I build from source : is it normal the members of classes are not highlighted ? Because on C::B 13.12 they are highlighted in purple (default theme color).
This is controlled by Settings->Editor->Code Completion->pseudo semantic keyword highlighting.
@devs: Some of the options there are "Disable xyz", and some are "Enable xyz"... this is kind of confusing.
I prefer the "Enable xyz" kinds option. :)
-
But I have another question concerning the syntax hightlight when I build from source : is it normal the members of classes are not highlighted ? Because on C::B 13.12 they are highlighted in purple (default theme color).
This is controlled by Settings->Editor->Code Completion->pseudo semantic keyword highlighting.
@devs: Some of the options there are "Disable xyz", and some are "Enable xyz"... this is kind of confusing.
Thanks for the help :D !