Author Topic: Symbol coloring being removed  (Read 3925 times)

dunkers

  • Senior Community Member
  • Posts: 776
  • Hero Points: 36
Symbol coloring being removed
« on: November 14, 2010, 06:32:45 PM »
Suppose you have a dual-window setup with file1 in one window and file2 in the other, with symbol coloring turned on. Each window shows the coloring appropriate to the file being displayed. Now, suppose you have a single file displayed in those two windows, with each window showing a different part of the file. Each window again shows the symbol coloring appropriate to that file.

Except... if the relative positions are a long way apart then when you start editing in a window the other window will lose the symbol coloring. I think that this shouldn't occur, and that each window should continue to display the symbol coloring. This is a bug, in other words.

I think it occurs because only parts of the file above and below the edit window are parsed for symbols, for speed, and the code doesn't check for multiple views into the buffer.

Dennis

  • Senior Community Member
  • Posts: 3968
  • Hero Points: 517
Re: Symbol coloring being removed
« Reply #1 on: November 16, 2010, 04:18:42 PM »
This is by design, and yes, it is for performance.  Only the active editor window gets Symbol coloring updates.

Also, symbol coloring only colors the current page of file and some surrounding lines, not the entire file, again, this is for performance.  You can configure symbol coloring to color the entire file, and then the coloring would show in both windows, but you would be forcing it to color a lot of stuff you are not looking at also, and the performance would be really bad.  Feel free to try out different settings, but take some notes on the default settings before you do, because it is flexible enough to let you shoot yourself in the foot and be somewhat annoying.

Tools > Options > Editing > Context Tagging(R) > Symbol coloring performance.

When you make modifications to a file, all the symbol coloring information has to be recalculated, because any edit could drastically change symbol coloring results.  That why the inactive window's symbol coloring is erased after an edit.

dunkers

  • Senior Community Member
  • Posts: 776
  • Hero Points: 36
Re: Symbol coloring being removed
« Reply #2 on: November 16, 2010, 05:31:33 PM »
OK, thanks for the explanation :)

The unexplained bit is why I only just noticed this...