Redo mode keys slightly more cleanly and apply them to command prompt editing. vi or emacs mode is controlled by the session option status-keys.

This commit is contained in:
Nicholas Marriott
2009-02-13 21:39:45 +00:00
parent 47e6b2725d
commit 95c8c049f5
11 changed files with 320 additions and 176 deletions

View File

@ -1,4 +1,4 @@
/* $Id: cmd-set-option.c,v 1.58 2009-01-30 00:24:49 nicm Exp $ */
/* $Id: cmd-set-option.c,v 1.59 2009-02-13 21:39:45 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -42,6 +42,9 @@ const struct cmd_entry cmd_set_option_entry = {
cmd_option_print
};
const char *set_option_status_keys_list[] = {
"emacs", "vi", NULL
};
const char *set_option_bell_action_list[] = {
"none", "any", "current", NULL
};
@ -64,6 +67,7 @@ const struct set_option_entry set_option_table[NSETOPTION] = {
{ "status-bg", SET_OPTION_COLOUR, 0, 0, NULL },
{ "status-fg", SET_OPTION_COLOUR, 0, 0, NULL },
{ "status-interval", SET_OPTION_NUMBER, 0, INT_MAX, NULL },
{ "status-keys", SET_OPTION_CHOICE, 0, 0, set_option_status_keys_list },
{ "status-left", SET_OPTION_STRING, 0, 0, NULL },
{ "status-left-length", SET_OPTION_NUMBER, 0, SHRT_MAX, NULL },
{ "status-right", SET_OPTION_STRING, 0, 0, NULL },