Sublime Forum

C++ Syntax highlighting bugs and minimap bug

#1

I think I might have found a few bugs in the C++ syntax highlighting and the minimap.

For the minimap, if you set “scroll_past_end” in your preferences to “true” you can scroll past the end with the mouse wheel, but not with the minimap, and if you try to use the minimap after you’ve scrolled past the bottom with the mouse wheel, the map will jerk back up so that it’s not past the end any more.

Another thing with the minimap is that it doesn’t let you scroll sideways.

With C++ syntax highlighting, I found a weird bug so that if you do this:

void function() // comment a // comment b { // code }
comment a and b won’t have proper syntax highlighting, they just appear white (actually sometimes the last few lines have syntax highlighting but not normally).

Another thing is that if you have something in a constructor’s initializer list on a new line, it will think it’s a function call:

a::a() : b(1), c(1), d(1) {

d will be highlighted in green like a function call.

One more thing is that when you do something like this:

myClass& myClass::function(const myClass& rhs) {

The second myClass, function, and const will all be highlighted, but if you do:

myClass& myClass::operator=(const myClass& rhs) {

Only the word “operator” and const will be highlighted, not the second myClass.

I hope you guys can fix some of these things even though they’re just annoyances, but keep up the great work, Sublime is awesome!

0 Likes