diff options
author | sabetts <sabetts> | 2003-04-05 23:54:30 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2003-04-05 23:54:30 +0000 |
commit | 574a96e7beb091762046ce4b04fb41dcf82bc2fc (patch) | |
tree | fadcfb323cef8476900654f1032821b7bd368c95 /src/actions.c | |
parent | cee9fe0516fbc0946d568d7761d771cf204eb3b9 (diff) | |
download | ratpoison-574a96e7beb091762046ce4b04fb41dcf82bc2fc.zip |
* src/window.c (get_window_list): if wrap_window_list is on then
the end of the mark is the length of the buffer minus the start of
the mark.
* src/main.c (init_defaults): init wrap_window_list to 0.
* src/input.c (update_input_window): store the height in a
variable.
* src/data.h (struct rp_defaults): new member, wrap_window_list.
* src/bar.h [message]: wrap msg arg in parens.
(marked_wrapped_message): new prototype
* src/bar.c (bar_y): new argument, height. All callers updated.
(bar_y): use height in calculations.
(update_window_names): print a column of windows if
defaults.wrap_window_list is on.
(count_lines): new function
(max_line_length): likewise
(pos_in_line): likewise
(line_beginning): likewise
(marked_wrapped_message): likewise
* src/actions.c (user_commands): new commands 'verbexec' and
'defwrapwinlist'. Move @end take to after the def* commands.
(cmd_verbexec): new function. Added prototype.
(cmd_defwrapwinlist): likewise
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/src/actions.c b/src/actions.c index 5aa6cd3..456abc1 100644 --- a/src/actions.c +++ b/src/actions.c @@ -95,7 +95,7 @@ static user_command user_commands[] = {"fselect", cmd_fselect, arg_VOID}, {"fdump", cmd_fdump, arg_STRING}, {"frestore", cmd_frestore, arg_STRING}, - /*@end (tag required for genrpbindings) */ + {"verbexec", cmd_verbexec, arg_STRING}, /* Commands to set default behavior. */ {"defbargravity", cmd_defbargravity, arg_STRING}, @@ -115,6 +115,8 @@ static user_command user_commands[] = {"defbgcolor", cmd_defbgcolor, arg_STRING}, {"defbarpadding", cmd_defbarpadding, arg_STRING}, {"defresizeunit", cmd_defresizeunit, arg_STRING}, + {"defwrapwinlist", cmd_defwrapwinlist, arg_STRING}, + /*@end (tag required for genrpbindings) */ /* Commands to help debug ratpoison. */ #ifdef DEBUG @@ -3105,3 +3107,28 @@ cmd_frestore (int interactively, void *data) PRINT_DEBUG (("Done.\n")); return NULL; } + +char * +cmd_verbexec (int interactive, void *data) +{ + char msg[100]="Running "; + strncat(msg, data, 100-strlen(msg)); + + if(data) cmd_echo(interactive, msg); + return cmd_exec(interactive, data); +} + +char * +cmd_defwrapwinlist (int interactive, void *data) +{ + if (data == NULL && !interactive) + return xsprintf ("%d", defaults.wrap_window_list); + + if (data == NULL + || sscanf (data, "%d", &defaults.wrap_window_list) < 1) + { + message (" defwrapwinlist: One argument required "); + } + + return NULL; +} |