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
This commit is contained in:
parent
c0eb6faa47
commit
8f5b9fb519
Notes:
blender-bot
2023-02-14 01:11:05 +01:00
Referenced by issue #75369, Text Editor: line number color used for text
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue