Revision: 2673
http://tmux.svn.sourceforge.net/tmux/?rev=2673&view=rev
Author: tcunha
Date: 2012-01-23 12:23:27 +0000 (Mon, 23 Jan 2012)
Log Message:
-----------
Sync OpenBSD patchset 1010:
Show pane size in top right of display panes mode.
Modified Paths:
--------------
trunk/screen-redraw.c
Modified: trunk/screen-redraw.c
===================================================================
--- trunk/screen-redraw.c 2012-01-22 23:41:34 UTC (rev 2672)
+++ trunk/screen-redraw.c 2012-01-23 12:23:27 UTC (rev 2673)
@@ -286,15 +286,7 @@
if (wp->sx < len * 6 || wp->sy < 5) {
tty_cursor(tty, xoff + px - len / 2, yoff + py);
- memcpy(&gc, &grid_default_cell, sizeof gc);
- gc.data = '_'; /* not space */
- if (w->active == wp)
- colour_set_fg(&gc, active_colour);
- else
- colour_set_fg(&gc, colour);
- tty_attributes(tty, &gc);
- tty_puts(tty, buf);
- return;
+ goto draw_text;
}
px -= len * 3;
@@ -321,4 +313,21 @@
}
px += 6;
}
+
+ len = xsnprintf(buf, sizeof buf, "%ux%u", wp->sx, wp->sy);
+ if (wp->sx < len || wp->sy < 6)
+ return;
+ tty_cursor(tty, xoff + wp->sx - len, yoff);
+
+draw_text:
+ memcpy(&gc, &grid_default_cell, sizeof gc);
+ gc.data = '_'; /* not space */
+ if (w->active == wp)
+ colour_set_fg(&gc, active_colour);
+ else
+ colour_set_fg(&gc, colour);
+ tty_attributes(tty, &gc);
+ tty_puts(tty, buf);
+
+ tty_cursor(tty, 0, 0);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs