Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/editors/space_text/text_draw.c17
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) {