Page MenuHome

Fix for T75369: Text Editor Line Color
ClosedPublic

Authored by Harley Acheson (harley) on Apr 4 2020, 6:51 PM.

Details

Summary

As reported here, the Text Editor uses the incorrect theme color for text lines if syntax highlighting is OFF but line numbers are ON.

This can be seen easily if you change the line number and text colors a bit. In the middle of the following you will see that regular text lines (except for current line) are drawn in the line number color:

In a nutshell the code was changing the text color to draw the line numbers but was not cleaning up after itself and changing the color back. After this patch is applied it works correctly in all three variations:

Diff Detail

Repository
rB Blender

Event Timeline

That was how it worked before (rBfc53c6f9).
But before that there was no TH_LINENUMBERS that was added in rB8c6ce742.
I can't say about removing that comment, but otherwise the patch looks good imho.

This revision is now accepted and ready to land.Aug 26 2020, 8:01 PM

Note to self, don't remove the "itoa" comment

I think you can remove the comment.
It doesn't add much to the code.
If one day we want to replace some BLI_snprintf with an equivalent type like BLI_itoa, there is no need to describe where this is possible in comments.

(I just didn't understand what that comment meant at the beginning).

Updating to current state of master

This revision was automatically updated to reflect the committed changes.