diff draw.c @ 6:0968b3739b8d

apply keymodes patch
author paulo@thepaulopc
date Sun, 12 Jun 2011 14:32:54 -0700
parents faa4cb9d7bd6
children bc03b37b37ba
line diff
     1.1 --- a/draw.c	Wed Jan 27 23:28:29 2010 -0800
     1.2 +++ b/draw.c	Sun Jun 12 14:32:54 2011 -0700
     1.3 @@ -71,13 +71,21 @@
     1.4  	dc.w = blw;
     1.5  	drawtext(lt->symbol, dc.norm);
     1.6  	x = dc.x + dc.w;
     1.7 -	dc.w = textw(stext);
     1.8 +
     1.9 +	char *_stext = stext;
    1.10 +	if (getkeymode() == COMMANDMODE) {
    1.11 +		strcpy(cmtext, "-- CMD -- ");
    1.12 +		strncat(cmtext, stext, sizeof cmtext - 1 - strlen(cmtext));
    1.13 +		_stext = cmtext;
    1.14 +	}
    1.15 +	dc.w = textw(_stext);
    1.16  	dc.x = sw - dc.w;
    1.17  	if(dc.x < x) {
    1.18  		dc.x = x;
    1.19  		dc.w = sw - x;
    1.20  	}
    1.21 -	drawtext(stext, dc.norm);
    1.22 +	drawtext(_stext, dc.norm);
    1.23 +
    1.24  	if((dc.w = dc.x - x) > bh) {
    1.25  		dc.x = x;
    1.26  		drawtext(sel ? sel->name : NULL, sel ? dc.sel : dc.norm);