Sync OpenBSD patchset 1119:

Switch all of the various choose- and list- commands over to the format
infrastructure, from Thomas Adam.
This commit is contained in:
Tiago Cunha
2012-05-22 21:03:25 +00:00
parent baafc17a1e
commit 5cc4961fd2
16 changed files with 211 additions and 112 deletions

32
tmux.h
View File

@@ -88,6 +88,37 @@ extern char **environ;
#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
#endif
/* Default format templates. */
#define DEFAULT_BUFFER_LIST_TEMPLATE \
"#{line}: #{buffer_size} bytes: \"#{buffer_sample}\""
#define DEFAULT_CLIENT_TEMPLATE \
"#{client_tty}: #{session_name} " \
"[#client_width}x#{client_height} #{client_termname}]" \
"{?client_utf8, (utf8),} #{?client_readonly, (ro),}"
#define DEFAULT_DISPLAY_MESSAGE_TEMPLATE \
"[#{session_name}] #{window_index}:" \
"#{window_name}, current pane #{pane_index} " \
"- (%H:%M %d-%b-%y)"
#define DEFAULT_FIND_WINDOW_TEMPLATE \
"#{window_index}: #{window_name} " \
"[#{window_width}x#{window_height}] " \
"(#{window_panes} panes) #{window_find_matches}"
#define DEFAULT_SESSION_TEMPLATE \
"#{session_name}: #{session_windows} windows " \
"(created #{session_created_string}) " \
"[#{session_width}x#{session_height}]" \
"#{?session_grouped, (group ,}" \
"#{session_group}#{?session_grouped,),}" \
"#{?session_attached, (attached),}"
#define DEFAULT_WINDOW_TEMPLATE \
"#{window_index}: #{window_name}#{window_flags} " \
"(#{window_panes} panes) " \
"[#{window_width}x#{window_height}] " \
"[layout #{window_layout}] #{window_id}" \
"#{?window_active, (active),}"
#define DEFAULT_PANE_INFO_TEMPLATE \
"#{session_name}:#{window_index}.#{pane_index}"
/* Bell option values. */
#define BELL_NONE 0
#define BELL_ANY 1
@@ -1402,6 +1433,7 @@ void format_client(struct format_tree *, struct client *);
void format_winlink(
struct format_tree *, struct session *, struct winlink *);
void format_window_pane(struct format_tree *, struct window_pane *);
void format_paste_buffer(struct format_tree *, struct paste_buffer *);
/* mode-key.c */
extern const struct mode_key_table mode_key_tables[];