From fab0d4e740c266f52c839ccfabd242f0e905e90d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 3 Oct 2015 12:08:30 +0200 Subject: core: add option weechat.look.paste_auto_add_newline (closes #543) --- src/core/wee-config.c | 7 +++++++ src/core/wee-config.h | 1 + 2 files changed, 8 insertions(+) (limited to 'src/core') diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 78a570d0f..247c2ea5a 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -148,6 +148,7 @@ struct t_config_option *config_look_mouse; struct t_config_option *config_look_mouse_timer_delay; struct t_config_option *config_look_nick_prefix; struct t_config_option *config_look_nick_suffix; +struct t_config_option *config_look_paste_auto_add_newline; struct t_config_option *config_look_paste_bracketed; struct t_config_option *config_look_paste_bracketed_timer_delay; struct t_config_option *config_look_paste_max_lines; @@ -2653,6 +2654,12 @@ config_weechat_init_options () N_("text to display after nick in prefix of message, example: \">\""), NULL, 0, 0, "", NULL, 0, NULL, NULL, &config_change_nick_prefix_suffix, NULL, NULL, NULL); + config_look_paste_auto_add_newline = config_file_new_option ( + weechat_config_file, ptr_section, + "paste_auto_add_newline", "boolean", + N_("automatically add a newline at the end of pasted text if there " + "are at least two lines and if a confirmation is asked"), + NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); config_look_paste_bracketed = config_file_new_option ( weechat_config_file, ptr_section, "paste_bracketed", "boolean", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index 9ce97a4f9..443a6f82d 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -194,6 +194,7 @@ extern struct t_config_option *config_look_mouse; extern struct t_config_option *config_look_mouse_timer_delay; extern struct t_config_option *config_look_nick_prefix; extern struct t_config_option *config_look_nick_suffix; +extern struct t_config_option *config_look_paste_auto_add_newline; extern struct t_config_option *config_look_paste_bracketed; extern struct t_config_option *config_look_paste_bracketed_timer_delay; extern struct t_config_option *config_look_paste_max_lines; -- cgit v1.2.3