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
path: root/source
diff options
context:
space:
mode:
authorRicki Myers <antihc3@gmail.com>2008-03-06 04:54:04 +0300
committerRicki Myers <antihc3@gmail.com>2008-03-06 04:54:04 +0300
commited9f3c2a250ede9043e0f3f59a739ab9e4685356 (patch)
treeb4321ddd27f64de23453d64e565657f1489f40d5 /source
parent3ebcb390906a2d0e4685d3fbf374c7a5eb740874 (diff)
Change the current line number to the cursor color when line numbers is toggled
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/drawtext.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/src/drawtext.c b/source/blender/src/drawtext.c
index 01c40c742f7..b41bffcfa6f 100644
--- a/source/blender/src/drawtext.c
+++ b/source/blender/src/drawtext.c
@@ -1037,7 +1037,12 @@ void drawtextspace(ScrArea *sa, void *spacedata)
for (i=0; i<st->viewlines && tmp; i++, tmp= tmp->next) {
if(st->showlinenrs) {
- BIF_ThemeColor(TH_TEXT);
+ /*Change the color of the current line the cursor is on*/
+ if(tmp == text->curl) {
+ BIF_ThemeColor(TH_HILITE);
+ } else {
+ BIF_ThemeColor(TH_TEXT);
+ }
if(((float)(i + linecount + 1)/10000.0) < 1.0) {
sprintf(linenr, "%4d", i + linecount + 1);
glRasterPos2i(TXT_OFFSET - 7, curarea->winy-st->lheight*(i+1));
@@ -1045,6 +1050,7 @@ void drawtextspace(ScrArea *sa, void *spacedata)
sprintf(linenr, "%5d", i + linecount + 1);
glRasterPos2i(TXT_OFFSET - 11, curarea->winy-st->lheight*(i+1));
}
+ BIF_ThemeColor(TH_TEXT);
BMF_DrawString(spacetext_get_font(st), linenr);
text_draw(st, tmp->line, st->left, 0, 1, TXT_OFFSET + TEXTXLOC, curarea->winy-st->lheight*(i+1), tmp->format);
} else