Kaydet (Commit) bae420a7 authored tarafından Matthew Brush's avatar Matthew Brush

Merge branch 'rpalli/replace1'

Closes #189
......@@ -2651,6 +2651,11 @@ extract_filetype_regex Regex to extract filetype name from file S
via capture group one.
**Search related**
find_selection_type See `Find selection`_. 0 immediately
**Replace related**
replace_and_find_by_default Set ``Replace & Find`` button as default so false immediately
it will be activated when the Enter key is
pressed while one of the text fields has
focus.
**Build Menu related**
number_ft_menu_items The maximum number of menu items in the 2 on restart
filetype section of the Build menu.
......
......@@ -231,6 +231,8 @@ static void init_pref_groups(void)
"find_selection_type", GEANY_FIND_SEL_CURRENT_WORD);
stash_group_add_string(group, &file_prefs.extract_filetype_regex,
"extract_filetype_regex", GEANY_DEFAULT_FILETYPE_REGEX);
stash_group_add_boolean(group, &search_prefs.replace_and_find_by_default,
"replace_and_find_by_default", FALSE);
/* Note: Interface-related various prefs are in ui_init_prefs() */
......
......@@ -1390,7 +1390,9 @@ on_replace_find_entry_activate(GtkEntry *entry, gpointer user_data)
static void
on_replace_entry_activate(GtkEntry *entry, gpointer user_data)
{
on_replace_dialog_response(NULL, GEANY_RESPONSE_REPLACE, NULL);
on_replace_dialog_response(NULL,
search_prefs.replace_and_find_by_default ? GEANY_RESPONSE_REPLACE_AND_FIND : GEANY_RESPONSE_REPLACE,
NULL);
}
......
......@@ -78,6 +78,7 @@ typedef struct GeanySearchPrefs
gboolean use_current_word; /**< Use current word for default search text */
gboolean use_current_file_dir; /* find in files directory to use on showing dialog */
gboolean hide_find_dialog; /* hide the find dialog on next or previous */
gboolean replace_and_find_by_default; /* enter in replace window performs Replace & Find instead of Replace */
enum GeanyFindSelOptions find_selection_type;
}
GeanySearchPrefs;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment