diff options
author | Stefan Bolte <sbolte@lavabit.com> | 2013-04-18 00:31:57 +0200 |
---|---|---|
committer | Stefan Bolte <sbolte@lavabit.com> | 2013-04-18 00:31:57 +0200 |
commit | a8ed8093f80dfa701e51f4edf542b6eb620f50c7 (patch) | |
tree | 4a6a5eeb261980a698e373d68a71f0882b08973a /src/commands.c | |
parent | 6bd421d013edd373f7dedf573cd7e645b86ded01 (diff) | |
download | dwb-a8ed8093f80dfa701e51f4edf542b6eb620f50c7.zip |
Merging mode changing commands
Diffstat (limited to 'src/commands.c')
-rw-r--r-- | src/commands.c | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/src/commands.c b/src/commands.c index aa8d5f37..1e01d593 100644 --- a/src/commands.c +++ b/src/commands.c @@ -184,18 +184,6 @@ commands_add_search_field(KeyMap *km, Arg *a) }/*}}}*/ -DwbStatus -commands_insert_mode(KeyMap *km, Arg *a) -{ - return dwb_change_mode(INSERT_MODE); -} -DwbStatus -commands_normal_mode(KeyMap *km, Arg *a) -{ - dwb_change_mode(NORMAL_MODE, true); - return STATUS_OK; -} - /* commands_toggle_proxy {{{*/ DwbStatus commands_toggle_proxy(KeyMap *km, Arg *a) @@ -524,14 +512,14 @@ commands_entry_confirm(KeyMap *km, Arg *a) return STATUS_OK; }/*}}}*/ -/* commands_entry_escape {{{*/ DwbStatus -commands_entry_escape(KeyMap *km, Arg *a) +commands_change_mode(KeyMap *km, Arg *a) { - dwb_change_mode(NORMAL_MODE, true); - return STATUS_OK; -}/*}}}*/ - + if (a->b) + return dwb_change_mode(a->n, true); + else + return dwb_change_mode(a->n); +} /* commands_save_session {{{*/ DwbStatus commands_save_session(KeyMap *km, Arg *arg) @@ -802,13 +790,7 @@ commands_open_editor(KeyMap *km, Arg *arg) return editor_open(); }/*}}}*/ -/* dwb_command_mode {{{*/ -DwbStatus -commands_command_mode(KeyMap *km, Arg *arg) -{ - return dwb_change_mode(COMMAND_MODE); -}/*}}}*/ -/* dwb_command_mode {{{*/ +/* dwb_only {{{*/ DwbStatus commands_only(KeyMap *km, Arg *arg) { |