summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2020-05-13 02:30:32 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-03-26 21:02:19 +0200
commitc63321bb7a86e31553949c14eb690e35e7417c73 (patch)
treeefcba3819586545ffc963e7f0c767018fc7dec4c /src/core
parentaf493ac9761968a9b31c9489f46d50ce14c34ee7 (diff)
downloadweechat-c63321bb7a86e31553949c14eb690e35e7417c73.zip
core: Add an option to start multiline input text on a new line
This does the same as the lead_linebreak option in multiline.pl. That is, when the input contains more than one line, the first line will be displayed beneath the previous items in the bar. This is practical because all the lines in the input will be aligned. Related to #1498
Diffstat (limited to 'src/core')
-rw-r--r--src/core/wee-config.c8
-rw-r--r--src/core/wee-config.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/core/wee-config.c b/src/core/wee-config.c
index 7b24f68fc..7bfd364f5 100644
--- a/src/core/wee-config.c
+++ b/src/core/wee-config.c
@@ -157,6 +157,7 @@ struct t_config_option *config_look_hotlist_suffix;
struct t_config_option *config_look_hotlist_unique_numbers;
struct t_config_option *config_look_hotlist_update_on_buffer_switch;
struct t_config_option *config_look_input_cursor_scroll;
+struct t_config_option *config_look_input_multiline_lead_linebreak;
struct t_config_option *config_look_input_share;
struct t_config_option *config_look_input_share_overwrite;
struct t_config_option *config_look_input_undo_max;
@@ -3369,6 +3370,13 @@ config_weechat_init_options ()
"to display end of line"),
NULL, 0, 100, "20", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ config_look_input_multiline_lead_linebreak = config_file_new_option (
+ weechat_config_file, weechat_config_section_look,
+ "input_multiline_lead_linebreak", "boolean",
+ N_("start the input text on a new line when the input contains "
+ "multiple lines, so that the start of the lines align"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
config_look_input_share = config_file_new_option (
weechat_config_file, weechat_config_section_look,
"input_share", "integer",
diff --git a/src/core/wee-config.h b/src/core/wee-config.h
index 7746daa79..f1963426b 100644
--- a/src/core/wee-config.h
+++ b/src/core/wee-config.h
@@ -209,6 +209,7 @@ extern struct t_config_option *config_look_hotlist_suffix;
extern struct t_config_option *config_look_hotlist_unique_numbers;
extern struct t_config_option *config_look_hotlist_update_on_buffer_switch;
extern struct t_config_option *config_look_input_cursor_scroll;
+extern struct t_config_option *config_look_input_multiline_lead_linebreak;
extern struct t_config_option *config_look_input_share;
extern struct t_config_option *config_look_input_share_overwrite;
extern struct t_config_option *config_look_input_undo_max;