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
master
Benno Schulenberg 2014-07-01 15:42:08 +00:00
parent ebcc68f51d
commit 4947ad83cb
3 changed files with 12 additions and 12 deletions

View File

@ -8,6 +8,9 @@
* src/prompt.c (do_prompt, get_prompt_string): Don't pass the
menu, just set it earlier.
* 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>
* src/cut.c, src/global.c, src/nano.c: Rename 'cut_till_end' to

View File

@ -934,15 +934,12 @@ void do_filesearch(void)
int i;
bool didfind;
i = filesearch_init();
do i = filesearch_init();
while (i == 1);
if (i == -1) /* Cancel, blank search string, or regcomp()
* failed. */
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)
return;

View File

@ -733,17 +733,17 @@ void shortcut_init(void)
#endif
#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);
#endif
#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);
#endif
#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);
#endif
@ -1117,10 +1117,10 @@ void shortcut_init(void)
add_to_sclist(((MMOST & ~MMAIN & ~MBROWSER) | MYESNO), "^C", do_cancel, 0);
#ifndef NANO_TINY
add_to_sclist(MWHEREIS|MREPLACE, "M-B", backwards_void, 0);
add_to_sclist(MWHEREIS|MREPLACE, "M-C", case_sens_void, 0);
add_to_sclist(MWHEREIS|MREPLACE|MWHEREISFILE, "M-B", backwards_void, 0);
add_to_sclist(MWHEREIS|MREPLACE|MWHEREISFILE, "M-C", case_sens_void, 0);
#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|MREPLACEWITH|MGOTOLINE, "^Y", do_first_line, 0);
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MGOTOLINE, "^V", do_last_line, 0);