summaryrefslogtreecommitdiffstats
path: root/key-bindings.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-01-11 23:31:46 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-01-11 23:31:46 +0000
commit162bacdcd91caf631db6979a21c27d208a66046b (patch)
treed678a35fa4c017ec034d6d6b19140f56fd8ca65a /key-bindings.c
parentd78bc5dfc40fe8d1a3842bd91dcfa5ca4c44ae01 (diff)
Window splitting. Two vertical panes fixed 50% each. This is a huge diff, still a couple of bugs (notably heap corruption somewhere causing segfault on exit).
Diffstat (limited to 'key-bindings.c')
-rw-r--r--key-bindings.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/key-bindings.c b/key-bindings.c
index f7b8e75e..b4084526 100644
--- a/key-bindings.c
+++ b/key-bindings.c
@@ -1,4 +1,4 @@
-/* $Id: key-bindings.c,v 1.42 2009-01-10 19:35:39 nicm Exp $ */
+/* $Id: key-bindings.c,v 1.43 2009-01-11 23:31:46 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -77,6 +77,7 @@ key_bindings_init(void)
int key;
const struct cmd_entry *entry;
} table[] = {
+ { '"', &cmd_split_window_entry },
{ '#', &cmd_list_buffers_entry },
{ '&', &cmd_kill_window_entry },
{ '-', &cmd_delete_buffer_entry },
@@ -94,17 +95,18 @@ key_bindings_init(void)
{ '=', &cmd_scroll_mode_entry },
{ '?', &cmd_list_keys_entry },
{ '[', &cmd_copy_mode_entry },
+ { '\'', &cmd_select_prompt_entry },
{ ']', &cmd_paste_buffer_entry },
{ 'c', &cmd_new_window_entry },
{ 'd', &cmd_detach_client_entry },
{ 'l', &cmd_last_window_entry },
{ 'n', &cmd_next_window_entry },
+ { 'o', &cmd_switch_pane_entry },
{ 'p', &cmd_previous_window_entry },
{ 'r', &cmd_refresh_client_entry },
{ 's', &cmd_list_sessions_entry },
{ 't', &cmd_clock_mode_entry },
{ 'w', &cmd_list_windows_entry },
- { '\'', &cmd_select_prompt_entry },
{ META, &cmd_send_prefix_entry },
};
u_int i;
@@ -152,13 +154,13 @@ key_bindings_error(struct cmd_ctx *ctx, const char *fmt, ...)
void printflike2
key_bindings_print(struct cmd_ctx *ctx, const char *fmt, ...)
{
- struct window *w = ctx->cursession->curw->window;
+ struct winlink *wl = ctx->cursession->curw;
va_list ap;
- window_set_mode(w, &window_more_mode);
+ window_pane_set_mode(wl->window->active, &window_more_mode);
va_start(ap, fmt);
- window_more_vadd(w, fmt, ap);
+ window_more_vadd(wl->window->active, fmt, ap);
va_end(ap);
}