diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2013-12-07 10:44:08 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-12-07 10:44:08 +0100 |
commit | 4520b0f7aeb87b269d8590354def1681b68d4c0e (patch) | |
tree | b5016fc754b6070cd016ce3fb2d84a58d04e3222 /src/core | |
parent | 70e68afbf8e6bf89e966694cb413663a8259b6c2 (diff) | |
download | weechat-4520b0f7aeb87b269d8590354def1681b68d4c0e.zip |
core: add option weechat.look.buffer_position
The value of option can be:
- "end": buffer is added after the end of list (number = last number + 1)
- "first_gap": buffer is added at first number available in the list
(after the end of list if no number is available)
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/wee-config.c | 10 | ||||
-rw-r--r-- | src/core/wee-config.h | 7 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 9b3888ccf..cfcdf4f9a 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -86,6 +86,7 @@ struct t_config_option *config_look_bar_more_up; struct t_config_option *config_look_bar_more_down; struct t_config_option *config_look_buffer_auto_renumber; struct t_config_option *config_look_buffer_notify_default; +struct t_config_option *config_look_buffer_position; struct t_config_option *config_look_buffer_search_case_sensitive; struct t_config_option *config_look_buffer_search_force_default; struct t_config_option *config_look_buffer_search_regex; @@ -2008,6 +2009,15 @@ config_weechat_init_options () "none=never display in hotlist"), "none|highlight|message|all", 0, 0, "all", NULL, 0, NULL, NULL, &config_change_buffer_notify_default, NULL, NULL, NULL); + config_look_buffer_position = config_file_new_option ( + weechat_config_file, ptr_section, + "buffer_position", "integer", + N_("position of a new buffer: end = after the end of list (number = " + "last number + 1) (default), first_gap = at first available " + "number in the list (after the end of list if no number is " + "available); this option is used only if the buffer has no layout " + "number"), + "end|first_gap", 0, 0, "end", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); config_look_buffer_search_case_sensitive = config_file_new_option ( weechat_config_file, ptr_section, "buffer_search_case_sensitive", "boolean", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index a5f1df7be..cefed77ee 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -37,6 +37,12 @@ enum t_config_look_align_end_of_lines CONFIG_LOOK_ALIGN_END_OF_LINES_MESSAGE, }; +enum t_config_look_buffer_position +{ + CONFIG_LOOK_BUFFER_POSITION_END = 0, + CONFIG_LOOK_BUFFER_POSITION_FIRST_GAP, +}; + enum t_config_look_buffer_search_where { CONFIG_LOOK_BUFFER_SEARCH_PREFIX = 0, @@ -110,6 +116,7 @@ extern struct t_config_option *config_look_bar_more_up; extern struct t_config_option *config_look_bar_more_down; extern struct t_config_option *config_look_buffer_auto_renumber; extern struct t_config_option *config_look_buffer_notify_default; +extern struct t_config_option *config_look_buffer_position; extern struct t_config_option *config_look_buffer_search_case_sensitive; extern struct t_config_option *config_look_buffer_search_force_default; extern struct t_config_option *config_look_buffer_search_regex; |