Revision: 2639
http://tmux.svn.sourceforge.net/tmux/?rev=2639&view=rev
Author: tcunha
Date: 2011-11-25 13:31:56 +0000 (Fri, 25 Nov 2011)
Log Message:
-----------
Sync OpenBSD patchset 980:
Add a pane_index format string and use it, from Ben Boeckel.
Modified Paths:
--------------
trunk/cmd-list-panes.c
trunk/format.c
Modified: trunk/cmd-list-panes.c
===================================================================
--- trunk/cmd-list-panes.c 2011-11-25 13:30:45 UTC (rev 2638)
+++ trunk/cmd-list-panes.c 2011-11-25 13:31:56 UTC (rev 2639)
@@ -102,21 +102,21 @@
if (template == NULL) {
switch (type) {
case 0:
- template = "#{line}: "
+ template = "#{pane_index}: "
"[#{pane_width}x#{pane_height}] [history "
"#{history_size}/#{history_limit}, "
"#{history_bytes} bytes] #{pane_id}"
"#{?pane_active, (active),}#{?pane_dead, (dead),}";
break;
case 1:
- template = "#{window_index}.#{line}: "
+ template = "#{window_index}.#{pane_index}: "
"[#{pane_width}x#{pane_height}] [history "
"#{history_size}/#{history_limit}, "
"#{history_bytes} bytes] #{pane_id}"
"#{?pane_active, (active),}#{?pane_dead, (dead),}";
break;
case 2:
- template = "#{session_name}:#{window_index}.#{line}: "
+ template =
"#{session_name}:#{window_index}.#{pane_index}: "
"[#{pane_width}x#{pane_height}] [history "
"#{history_size}/#{history_limit}, "
"#{history_bytes} bytes] #{pane_id}"
Modified: trunk/format.c
===================================================================
--- trunk/format.c 2011-11-25 13:30:45 UTC (rev 2638)
+++ trunk/format.c 2011-11-25 13:31:56 UTC (rev 2639)
@@ -361,6 +361,7 @@
struct grid_line *gl;
unsigned long long size;
u_int i;
+ u_int idx;
size = 0;
for (i = 0; i < gd->hsize; i++) {
@@ -370,9 +371,13 @@
}
size += gd->hsize * sizeof *gd->linedata;
+ if (window_pane_index(wp, &idx) != 0)
+ fatalx("index not found");
+
format_add(ft, "pane_width", "%u", wp->sx);
format_add(ft, "pane_height", "%u", wp->sy);
format_add(ft, "pane_title", "%s", wp->base.title);
+ format_add(ft, "pane_index", "%u", idx);
format_add(ft, "history_size", "%u", gd->hsize);
format_add(ft, "history_limit", "%u", gd->hlimit);
format_add(ft, "history_bytes", "%llu", size);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs