diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2020-08-28 19:58:48 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2020-08-28 19:58:48 +0300 |
commit | 8f5b9fb51997c62ef13bf0848c6c213e8a100863 (patch) | |
tree | b7b48d97b7cdaefb7c4311fa20d74291697930c4 /source | |
parent | c0eb6faa47ecda8cac48e9ce7bb707dfdcbe360f (diff) |
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
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 17 |
1 files changed, 4 insertions, 13 deletions
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) { |