small edits to text editor from writing a python editor extension.
[blender.git] / source / blender / editors / space_text / text_draw.c
index 926ccc1914ab79dbf5a43f0ec3942cceb4053acd..6fbfc463c451a55cd1ee1daf396b51abc3a67180 100644 (file)
@@ -1101,6 +1101,20 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
                }
        }
 
+       if(st->line_hlight) {
+               /* TODO, dont draw if hidden */
+               int x1= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET;
+               int x2= x1 + ar->winx;
+               y= ar->winy-2 - vsell*st->lheight;
+
+               glColor4ub(255, 255, 255, 32);
+               
+               glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+               glEnable(GL_BLEND);
+               glRecti(x1, y, x2, y-st->lheight+1);
+               glDisable(GL_BLEND);
+       }
+       
        if(!hidden) {
                /* Draw the cursor itself (we draw the sel. cursor as this is the leading edge) */
                x= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET;
@@ -1288,7 +1302,7 @@ void draw_text_main(SpaceText *st, ARegion *ar)
        }
        y= ar->winy-st->lheight;
        winx= ar->winx - TXT_SCROLL_WIDTH;
-
+       
        /* draw cursor */
        draw_cursor(st, ar);