summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/wee-command.c9
-rw-r--r--src/core/wee-config.c11
-rw-r--r--src/core/wee-config.h7
-rw-r--r--src/core/wee-upgrade.c11
4 files changed, 24 insertions, 14 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index 80a053e3e..02d0da641 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -3525,6 +3525,8 @@ COMMAND_CALLBACK(input)
gui_input_search_text_here (buffer);
else if (string_strcmp (argv[1], "search_text") == 0)
gui_input_search_text (buffer);
+ else if (string_strcmp (argv[1], "search_history") == 0)
+ gui_input_search_history (buffer);
else if (string_strcmp (argv[1], "search_previous") == 0)
gui_input_search_previous (buffer);
else if (string_strcmp (argv[1], "search_next") == 0)
@@ -8481,6 +8483,7 @@ command_init ()
N_("> raw[complete_previous]: complete word with previous completion"),
N_("> raw[search_text_here]: search text in buffer at current position"),
N_("> raw[search_text]: search text in buffer"),
+ N_("> raw[search_history]: search text in command line history"),
N_("> raw[search_switch_case]: switch exact case for search"),
N_("> raw[search_switch_regex]: switch search type: string/regular expression"),
N_("> raw[search_switch_where]: switch search in messages/prefixes"),
@@ -8535,9 +8538,9 @@ command_init ()
N_("This command is used by key bindings or plugins.")),
"return || split_return || "
"complete_next || complete_previous || search_text_here || "
- "search_text || search_switch_case || search_switch_regex || "
- "search_switch_where || search_previous || search_next || "
- "search_stop_here || search_stop || "
+ "search_text || search_history || search_switch_case || "
+ "search_switch_regex || search_switch_where || search_previous || "
+ "search_next || search_stop_here || search_stop || "
"delete_previous_char || delete_next_char || delete_previous_word || "
"delete_previous_word_whitespace || delete_next_word || "
"delete_beginning_of_line || delete_beginning_of_input || "
diff --git a/src/core/wee-config.c b/src/core/wee-config.c
index 65644d324..ebf058958 100644
--- a/src/core/wee-config.c
+++ b/src/core/wee-config.c
@@ -89,7 +89,7 @@ struct t_config_section *weechat_config_section_buffer = NULL;
struct t_config_section *weechat_config_section_notify = NULL;
struct t_config_section *weechat_config_section_filter = NULL;
struct t_config_section *weechat_config_section_key[GUI_KEY_NUM_CONTEXTS] = {
- NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL,
};
/* config, startup section */
@@ -114,6 +114,7 @@ struct t_config_option *config_look_buffer_auto_renumber = NULL;
struct t_config_option *config_look_buffer_notify_default = NULL;
struct t_config_option *config_look_buffer_position = NULL;
struct t_config_option *config_look_buffer_search_case_sensitive = NULL;
+struct t_config_option *config_look_buffer_search_history = NULL;
struct t_config_option *config_look_buffer_search_force_default = NULL;
struct t_config_option *config_look_buffer_search_regex = NULL;
struct t_config_option *config_look_buffer_search_where = NULL;
@@ -3167,6 +3168,14 @@ config_weechat_init_options ()
N_("default text search in buffer: case sensitive or not"),
NULL, 0, 0, "off", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ config_look_buffer_search_history = config_file_new_option (
+ weechat_config_file, weechat_config_section_look,
+ "buffer_search_history", "enum",
+ N_("default text search command line history: local (buffer) or "
+ "global history"),
+ "local|global", 0, 0, "local",
+ NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
config_look_buffer_search_force_default = config_file_new_option (
weechat_config_file, weechat_config_section_look,
"buffer_search_force_default", "boolean",
diff --git a/src/core/wee-config.h b/src/core/wee-config.h
index 286a02c8b..a191505f1 100644
--- a/src/core/wee-config.h
+++ b/src/core/wee-config.h
@@ -50,6 +50,12 @@ enum t_config_look_buffer_position
CONFIG_LOOK_BUFFER_POSITION_FIRST_GAP,
};
+enum t_config_look_buffer_search_history
+{
+ CONFIG_LOOK_BUFFER_SEARCH_HISTORY_LOCAL = 0,
+ CONFIG_LOOK_BUFFER_SEARCH_HISTORY_GLOBAL,
+};
+
enum t_config_look_buffer_search_where
{
CONFIG_LOOK_BUFFER_SEARCH_PREFIX = 0,
@@ -165,6 +171,7 @@ 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_history;
extern struct t_config_option *config_look_buffer_search_force_default;
extern struct t_config_option *config_look_buffer_search_regex;
extern struct t_config_option *config_look_buffer_search_where;
diff --git a/src/core/wee-upgrade.c b/src/core/wee-upgrade.c
index dc04e33df..266cde9b3 100644
--- a/src/core/wee-upgrade.c
+++ b/src/core/wee-upgrade.c
@@ -546,16 +546,7 @@ upgrade_weechat_read_buffer (struct t_infolist *infolist)
}
}
- /* text search */
- ptr_buffer->text_search = infolist_integer (infolist, "text_search");
- ptr_buffer->text_search_exact = infolist_integer (infolist,
- "text_search_exact");
- ptr_buffer->text_search_found = infolist_integer (infolist,
- "text_search_found");
- if (ptr_buffer->text_search_input)
- free (ptr_buffer->text_search_input);
- str = infolist_string (infolist, "text_search_input");
- ptr_buffer->text_search_input = (str) ? strdup (str) : NULL;
+ /* text search is disabled after upgrade */
/* highlight options */
gui_buffer_set_highlight_words (