Author Topic: Matching parenthesis not highlighted properly  (Read 3085 times)

Offline UberNewb

  • Multiple posting newcomer
  • *
  • Posts: 35
Matching parenthesis not highlighted properly
« on: January 16, 2011, 08:51:56 am »
Using SVN 6906, WinVista, MinGW 3.4.5.

By looking at the attached picture, you can see that the matching parenthesis is not highlighted in green as it should be, but marked in red as if it did not have a match. When you move the caret to the matching parenthisis on the right it is still highlighted in red. Using a C++ source file at the moment.

Edit :
I continued editing, and the problems got worse, see the second attached picture. It is higlighting more text than it should as if it were all static chars and now it thinks the braces are not matched either.

I closed the project and restarted code blocks and the problem persisted. I have also attached the source file I was editing at the time (a C++ source file, renamed to .txt).


« Last Edit: January 16, 2011, 09:04:41 am by UberNewb »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Matching parenthesis not highlighted properly
« Reply #1 on: January 16, 2011, 09:39:37 am »
This is not a C::B error, it's a programming error.
Try to compile the source, it does not work.
The backslash is escaping the second quote, and therfore you have an unterminated string.
Changing '\' to '\\' should do the trick.

It will not compile anyway, becaue there are some other errors, like missing parentheses, etc.
« Last Edit: January 16, 2011, 09:42:14 am by jens »

Offline UberNewb

  • Multiple posting newcomer
  • *
  • Posts: 35
Re: Matching parenthesis not highlighted properly
« Reply #2 on: January 16, 2011, 11:13:09 am »
Quote from: jens
The backslash is escaping the second quote, and therfore you have an unterminated string.
Changing '\' to '\\' should do the trick.
Yeah, you're right. I was wrong. Nevermind.