mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Search: better support of --disable-charset
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
66da276200
commit
941a1eac1d
@ -61,8 +61,10 @@ typedef struct mc_search_struct
|
|||||||
{
|
{
|
||||||
/* public input data */
|
/* public input data */
|
||||||
|
|
||||||
|
#ifdef HAVE_CHARSET
|
||||||
/* search in all charsets */
|
/* search in all charsets */
|
||||||
gboolean is_all_charsets;
|
gboolean is_all_charsets;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* case sensitive search */
|
/* case sensitive search */
|
||||||
gboolean is_case_sensitive;
|
gboolean is_case_sensitive;
|
||||||
|
@ -258,7 +258,9 @@ dview_search_cmd (WDiff * dview)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
dview->search.handle->search_type = mcdiffview_search_options.type;
|
dview->search.handle->search_type = mcdiffview_search_options.type;
|
||||||
|
#ifdef HAVE_CHARSET
|
||||||
dview->search.handle->is_all_charsets = mcdiffview_search_options.all_codepages;
|
dview->search.handle->is_all_charsets = mcdiffview_search_options.all_codepages;
|
||||||
|
#endif
|
||||||
dview->search.handle->is_case_sensitive = mcdiffview_search_options.case_sens;
|
dview->search.handle->is_case_sensitive = mcdiffview_search_options.case_sens;
|
||||||
dview->search.handle->whole_words = mcdiffview_search_options.whole_words;
|
dview->search.handle->whole_words = mcdiffview_search_options.whole_words;
|
||||||
|
|
||||||
|
@ -2527,7 +2527,9 @@ edit_replace_cmd (WEdit * edit, int again)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
edit->search->search_type = edit_search_options.type;
|
edit->search->search_type = edit_search_options.type;
|
||||||
|
#ifdef HAVE_CHARSET
|
||||||
edit->search->is_all_charsets = edit_search_options.all_codepages;
|
edit->search->is_all_charsets = edit_search_options.all_codepages;
|
||||||
|
#endif
|
||||||
edit->search->is_case_sensitive = edit_search_options.case_sens;
|
edit->search->is_case_sensitive = edit_search_options.case_sens;
|
||||||
edit->search->whole_words = edit_search_options.whole_words;
|
edit->search->whole_words = edit_search_options.whole_words;
|
||||||
edit->search->search_fn = edit_search_cmd_callback;
|
edit->search->search_fn = edit_search_cmd_callback;
|
||||||
@ -2729,7 +2731,9 @@ edit_search_cmd (WEdit * edit, gboolean again)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
edit->search->search_type = edit_search_options.type;
|
edit->search->search_type = edit_search_options.type;
|
||||||
|
#ifdef HAVE_CHARSET
|
||||||
edit->search->is_all_charsets = edit_search_options.all_codepages;
|
edit->search->is_all_charsets = edit_search_options.all_codepages;
|
||||||
|
#endif
|
||||||
edit->search->is_case_sensitive = edit_search_options.case_sens;
|
edit->search->is_case_sensitive = edit_search_options.case_sens;
|
||||||
edit->search->whole_words = edit_search_options.whole_words;
|
edit->search->whole_words = edit_search_options.whole_words;
|
||||||
edit->search->search_fn = edit_search_cmd_callback;
|
edit->search->search_fn = edit_search_cmd_callback;
|
||||||
|
@ -170,7 +170,9 @@ editcmd_dialog_search_show (WEdit * edit)
|
|||||||
if (edit->search != NULL)
|
if (edit->search != NULL)
|
||||||
{
|
{
|
||||||
edit->search->search_type = edit_search_options.type;
|
edit->search->search_type = edit_search_options.type;
|
||||||
|
#ifdef HAVE_CHARSET
|
||||||
edit->search->is_all_charsets = edit_search_options.all_codepages;
|
edit->search->is_all_charsets = edit_search_options.all_codepages;
|
||||||
|
#endif
|
||||||
edit->search->is_case_sensitive = edit_search_options.case_sens;
|
edit->search->is_case_sensitive = edit_search_options.case_sens;
|
||||||
edit->search->whole_words = edit_search_options.whole_words;
|
edit->search->whole_words = edit_search_options.whole_words;
|
||||||
edit->search->search_fn = edit_search_cmd_callback;
|
edit->search->search_fn = edit_search_cmd_callback;
|
||||||
|
@ -1632,12 +1632,16 @@ run_process (void)
|
|||||||
options.content_regexp ? MC_SEARCH_T_REGEX : MC_SEARCH_T_NORMAL;
|
options.content_regexp ? MC_SEARCH_T_REGEX : MC_SEARCH_T_NORMAL;
|
||||||
search_content_handle->is_case_sensitive = options.content_case_sens;
|
search_content_handle->is_case_sensitive = options.content_case_sens;
|
||||||
search_content_handle->whole_words = options.content_whole_words;
|
search_content_handle->whole_words = options.content_whole_words;
|
||||||
|
#ifdef HAVE_CHARSET
|
||||||
search_content_handle->is_all_charsets = options.content_all_charsets;
|
search_content_handle->is_all_charsets = options.content_all_charsets;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
search_file_handle = mc_search_new (find_pattern, -1, NULL);
|
search_file_handle = mc_search_new (find_pattern, -1, NULL);
|
||||||
search_file_handle->search_type = options.file_pattern ? MC_SEARCH_T_GLOB : MC_SEARCH_T_REGEX;
|
search_file_handle->search_type = options.file_pattern ? MC_SEARCH_T_GLOB : MC_SEARCH_T_REGEX;
|
||||||
search_file_handle->is_case_sensitive = options.file_case_sens;
|
search_file_handle->is_case_sensitive = options.file_case_sens;
|
||||||
|
#ifdef HAVE_CHARSET
|
||||||
search_file_handle->is_all_charsets = options.file_all_charsets;
|
search_file_handle->is_all_charsets = options.file_all_charsets;
|
||||||
|
#endif
|
||||||
search_file_handle->is_entire_line = options.file_pattern;
|
search_file_handle->is_entire_line = options.file_pattern;
|
||||||
|
|
||||||
resuming = FALSE;
|
resuming = FALSE;
|
||||||
|
@ -163,7 +163,9 @@ mcview_continue_search_cmd (mcview_t * view)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
view->search->search_type = mcview_search_options.type;
|
view->search->search_type = mcview_search_options.type;
|
||||||
|
#ifdef HAVE_CHARSET
|
||||||
view->search->is_all_charsets = mcview_search_options.all_codepages;
|
view->search->is_all_charsets = mcview_search_options.all_codepages;
|
||||||
|
#endif
|
||||||
view->search->is_case_sensitive = mcview_search_options.case_sens;
|
view->search->is_case_sensitive = mcview_search_options.case_sens;
|
||||||
view->search->whole_words = mcview_search_options.whole_words;
|
view->search->whole_words = mcview_search_options.whole_words;
|
||||||
view->search->search_fn = mcview_search_cmd_callback;
|
view->search->search_fn = mcview_search_cmd_callback;
|
||||||
|
@ -151,7 +151,9 @@ mcview_dialog_search (mcview_t * view)
|
|||||||
if (view->search != NULL)
|
if (view->search != NULL)
|
||||||
{
|
{
|
||||||
view->search->search_type = mcview_search_options.type;
|
view->search->search_type = mcview_search_options.type;
|
||||||
|
#ifdef HAVE_CHARSET
|
||||||
view->search->is_all_charsets = mcview_search_options.all_codepages;
|
view->search->is_all_charsets = mcview_search_options.all_codepages;
|
||||||
|
#endif
|
||||||
view->search->is_case_sensitive = mcview_search_options.case_sens;
|
view->search->is_case_sensitive = mcview_search_options.case_sens;
|
||||||
view->search->whole_words = mcview_search_options.whole_words;
|
view->search->whole_words = mcview_search_options.whole_words;
|
||||||
view->search->search_fn = mcview_search_cmd_callback;
|
view->search->search_fn = mcview_search_cmd_callback;
|
||||||
|
Loading…
Reference in New Issue
Block a user