Commit: 8f5b9fb51997c62ef13bf0848c6c213e8a100863
Author: Harley Acheson
Date:   Fri Aug 28 09:58:48 2020 -0700
Branches: master
https://developer.blender.org/rB8f5b9fb51997c62ef13bf0848c6c213e8a100863

Fix for T75369: Text Editor Line Color

Use correct text color when syntax highlighting is off but line numbers are on.

Differential Revision: https://developer.blender.org/D7337

Reviewed by Hans Goudey

===================================================================

M       source/blender/editors/space_text/text_draw.c

===================================================================

diff --git a/source/blender/editors/space_text/text_draw.c 
b/source/blender/editors/space_text/text_draw.c
index f1b1d6760f3..ec5175eae51 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1660,25 +1660,16 @@ void draw_text_main(SpaceText *st, ARegion *region)
     }
 
     if (st->showlinenrs && !wrap_skip) {
-      /* draw line number */
-      if (tmp == text->curl) {
-        UI_FontThemeColor(tdc.font_id, TH_HILITE);
-      }
-      else {
-        UI_FontThemeColor(tdc.font_id, TH_LINENUMBERS);
-      }
-
+      /* Draw line number. */
+      UI_FontThemeColor(tdc.font_id, (tmp == text->curl) ? TH_HILITE : 
TH_LINENUMBERS);
       BLI_snprintf(linenr,
                    sizeof(linenr),
                    "%*d",
                    st->runtime.line_number_display_digits,
                    i + linecount + 1);
-      /* itoa(i + linecount + 1, linenr, 10); */ /* not ansi-c :/ */
       text_font_draw(&tdc, TXT_NUMCOL_PAD * st->runtime.cwidth_px, y, linenr);
-
-      if (tmp == text->curl) {
-        UI_FontThemeColor(tdc.font_id, TH_TEXT);
-      }
+      /* Change back to text color. */
+      UI_FontThemeColor(tdc.font_id, TH_TEXT);
     }
 
     if (st->wordwrap) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to