aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authornicm <nicm>2017-05-07 22:27:57 +0000
committernicm <nicm>2017-05-07 22:27:57 +0000
commit5fee4638e08b1642a3b8882c5cf8825dd76b3a81 (patch)
tree5f05c50a17e78893cfee68f343c63ce114fd0ddd /tmux.h
parentd52f579fd5e7fd21d7dcf837780cbf98498b10ce (diff)
downloadrtmux-5fee4638e08b1642a3b8882c5cf8825dd76b3a81.tar.gz
rtmux-5fee4638e08b1642a3b8882c5cf8825dd76b3a81.tar.bz2
rtmux-5fee4638e08b1642a3b8882c5cf8825dd76b3a81.zip
Add a format for the name of the pane's mode, lets it be used as a
conditional for key bindings.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/tmux.h b/tmux.h
index 378c937a..1b1343b7 100644
--- a/tmux.h
+++ b/tmux.h
@@ -689,15 +689,18 @@ struct screen_write_ctx {
* right function to handle input and output.
*/
struct window_mode {
- struct screen *(*init)(struct window_pane *);
- void (*free)(struct window_pane *);
- void (*resize)(struct window_pane *, u_int, u_int);
- void (*key)(struct window_pane *, struct client *, struct session *,
- key_code, struct mouse_event *);
-
- const char *(*key_table)(struct window_pane *);
- void (*command)(struct window_pane *, struct client *,
- struct session *, struct args *, struct mouse_event *);
+ const char *name;
+
+ struct screen *(*init)(struct window_pane *);
+ void (*free)(struct window_pane *);
+ void (*resize)(struct window_pane *, u_int, u_int);
+ void (*key)(struct window_pane *, struct client *,
+ struct session *, key_code, struct mouse_event *);
+
+ const char *(*key_table)(struct window_pane *);
+ void (*command)(struct window_pane *, struct client *,
+ struct session *, struct args *,
+ struct mouse_event *);
};
#define WINDOW_MODE_TIMEOUT 180