Commit 4947ad83 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Showing that it is possible to have case-sensitive, regular-expressive,

and backwards searching in the file browser.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5047 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 12 additions and 12 deletions
+12 -12
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
* src/prompt.c (do_prompt, get_prompt_string): Don't pass the * src/prompt.c (do_prompt, get_prompt_string): Don't pass the
menu, just set it earlier. menu, just set it earlier.
* src/prompt.c (get_prompt_string): Group the arguments better. * src/prompt.c (get_prompt_string): Group the arguments better.
* src/global.c (shortcut_init), src/browser(do_filesearch): Show
that it is possible to have case-sensitive, regular-expressive,
and backwards searching in the file browser.
2014-06-30 Mark Majeres <mark@engine12.com> 2014-06-30 Mark Majeres <mark@engine12.com>
* src/cut.c, src/global.c, src/nano.c: Rename 'cut_till_end' to * src/cut.c, src/global.c, src/nano.c: Rename 'cut_till_end' to
......
...@@ -934,15 +934,12 @@ void do_filesearch(void) ...@@ -934,15 +934,12 @@ void do_filesearch(void)
int i; int i;
bool didfind; bool didfind;
i = filesearch_init(); do i = filesearch_init();
while (i == 1);
if (i == -1) /* Cancel, blank search string, or regcomp() if (i == -1) /* Cancel, blank search string, or regcomp()
* failed. */ * failed. */
filesearch_abort(); filesearch_abort();
#if !defined(NANO_TINY) || defined(HAVE_REGEX_H)
else if (i == 1) /* Case Sensitive, Backwards, or Regexp search
* toggle. */
do_filesearch();
#endif
if (i != 0) if (i != 0)
return; return;
......
...@@ -733,17 +733,17 @@ void shortcut_init(void) ...@@ -733,17 +733,17 @@ void shortcut_init(void)
#endif #endif
#ifndef NANO_TINY #ifndef NANO_TINY
add_to_funcs(case_sens_void, MWHEREIS|MREPLACE, add_to_funcs(case_sens_void, MWHEREIS|MREPLACE|MWHEREISFILE,
N_("Case Sens"), IFSCHELP(nano_case_msg), FALSE, VIEW); N_("Case Sens"), IFSCHELP(nano_case_msg), FALSE, VIEW);
#endif #endif
#ifdef HAVE_REGEX_H #ifdef HAVE_REGEX_H
add_to_funcs(regexp_void, MWHEREIS|MREPLACE, add_to_funcs(regexp_void, MWHEREIS|MREPLACE|MWHEREISFILE,
N_("Regexp"), IFSCHELP(nano_regexp_msg), FALSE, VIEW); N_("Regexp"), IFSCHELP(nano_regexp_msg), FALSE, VIEW);
#endif #endif
#ifndef NANO_TINY #ifndef NANO_TINY
add_to_funcs(backwards_void, MWHEREIS|MREPLACE, add_to_funcs(backwards_void, MWHEREIS|MREPLACE|MWHEREISFILE,
N_("Backwards"), IFSCHELP(nano_reverse_msg), FALSE, VIEW); N_("Backwards"), IFSCHELP(nano_reverse_msg), FALSE, VIEW);
#endif #endif
...@@ -1117,10 +1117,10 @@ void shortcut_init(void) ...@@ -1117,10 +1117,10 @@ void shortcut_init(void)
add_to_sclist(((MMOST & ~MMAIN & ~MBROWSER) | MYESNO), "^C", do_cancel, 0); add_to_sclist(((MMOST & ~MMAIN & ~MBROWSER) | MYESNO), "^C", do_cancel, 0);
#ifndef NANO_TINY #ifndef NANO_TINY
add_to_sclist(MWHEREIS|MREPLACE, "M-B", backwards_void, 0); add_to_sclist(MWHEREIS|MREPLACE|MWHEREISFILE, "M-B", backwards_void, 0);
add_to_sclist(MWHEREIS|MREPLACE, "M-C", case_sens_void, 0); add_to_sclist(MWHEREIS|MREPLACE|MWHEREISFILE, "M-C", case_sens_void, 0);
#endif #endif
add_to_sclist(MWHEREIS|MREPLACE, "M-R", regexp_void, 0); add_to_sclist(MWHEREIS|MREPLACE|MWHEREISFILE, "M-R", regexp_void, 0);
add_to_sclist(MWHEREIS|MREPLACE, "^R", flip_replace_void, 0); add_to_sclist(MWHEREIS|MREPLACE, "^R", flip_replace_void, 0);
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE, "^Y", do_first_line, 0); add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE, "^Y", do_first_line, 0);
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE, "^V", do_last_line, 0); add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE, "^V", do_last_line, 0);
......
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