From a81685bfac9d4eac3a7cfd8f8ce13033a46fe01c Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 10 Oct 2016 21:51:39 +0000 Subject: Add static in cmd-* and fix a few other nits. --- window-clock.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'window-clock.c') diff --git a/window-clock.c b/window-clock.c index f6dc85cd..a9bbb75a 100644 --- a/window-clock.c +++ b/window-clock.c @@ -24,14 +24,14 @@ #include "tmux.h" -struct screen *window_clock_init(struct window_pane *); -void window_clock_free(struct window_pane *); -void window_clock_resize(struct window_pane *, u_int, u_int); -void window_clock_key(struct window_pane *, struct client *, - struct session *, key_code, struct mouse_event *); +static struct screen *window_clock_init(struct window_pane *); +static void window_clock_free(struct window_pane *); +static void window_clock_resize(struct window_pane *, u_int, u_int); +static void window_clock_key(struct window_pane *, struct client *, + struct session *, key_code, struct mouse_event *); -void window_clock_timer_callback(int, short, void *); -void window_clock_draw_screen(struct window_pane *); +static void window_clock_timer_callback(int, short, void *); +static void window_clock_draw_screen(struct window_pane *); const struct window_mode window_clock_mode = { window_clock_init, @@ -119,7 +119,7 @@ const char window_clock_table[14][5][5] = { { 1,0,0,0,1 } }, }; -void +static void window_clock_timer_callback(__unused int fd, __unused short events, void *arg) { struct window_pane *wp = arg; @@ -142,7 +142,7 @@ window_clock_timer_callback(__unused int fd, __unused short events, void *arg) server_redraw_window(wp->window); } -struct screen * +static struct screen * window_clock_init(struct window_pane *wp) { struct window_clock_mode_data *data; @@ -164,7 +164,7 @@ window_clock_init(struct window_pane *wp) return (s); } -void +static void window_clock_free(struct window_pane *wp) { struct window_clock_mode_data *data = wp->modedata; @@ -174,7 +174,7 @@ window_clock_free(struct window_pane *wp) free(data); } -void +static void window_clock_resize(struct window_pane *wp, u_int sx, u_int sy) { struct window_clock_mode_data *data = wp->modedata; @@ -184,7 +184,7 @@ window_clock_resize(struct window_pane *wp, u_int sx, u_int sy) window_clock_draw_screen(wp); } -void +static void window_clock_key(struct window_pane *wp, __unused struct client *c, __unused struct session *sess, __unused key_code key, __unused struct mouse_event *m) @@ -192,7 +192,7 @@ window_clock_key(struct window_pane *wp, __unused struct client *c, window_pane_reset_mode(wp); } -void +static void window_clock_draw_screen(struct window_pane *wp) { struct window_clock_mode_data *data = wp->modedata; -- cgit From 76d6d3641f271be1756e41494960d96714e7ee58 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 11 Oct 2016 07:23:34 +0000 Subject: Fundamental change to how copy mode key bindings work: The vi-copy and emacs-copy mode key tables are gone, and instead copy mode commands are bound in one of two normal key tables ("copy-mode" or "copy-mode-vi"). Keys are bound to "send-keys -X copy-mode-command". So: bind -temacs-copy C-Up scroll-up bind -temacs-copy -R5 WheelUpPane scroll-up Becomes: bind -Tcopy-mode C-Up send -X scroll-up bind -Tcopy-mode WheelUpPane send -N5 -X scroll-up This allows the full command parser and command set to be used - for example, we can use the normal command prompt for searching, jumping, and so on instead of a custom one: bind -Tcopy-mode C-r command-prompt -p'search up' "send -X search-backward '%%'" command-prompt also gets a -1 option to only require on key press, which is needed for jumping. The plan is to get rid of mode keys entirely, so more to come eventually. --- window-clock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'window-clock.c') diff --git a/window-clock.c b/window-clock.c index a9bbb75a..c80e9af7 100644 --- a/window-clock.c +++ b/window-clock.c @@ -34,10 +34,10 @@ static void window_clock_timer_callback(int, short, void *); static void window_clock_draw_screen(struct window_pane *); const struct window_mode window_clock_mode = { - window_clock_init, - window_clock_free, - window_clock_resize, - window_clock_key, + .init = window_clock_init, + .free = window_clock_free, + .resize = window_clock_resize, + .key = window_clock_key, }; struct window_clock_mode_data { -- cgit