Mercurial > hg
changeset 979:ea939ff047d8
Improve /buffer search_*
Quotes can be used in search strings, for example one can search for
" is " now (with spaces around the word).
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 21 Oct 2006 11:22:15 +0200 |
parents | a58dfdd6d058 |
children | 023891f99732 |
files | mcabber/src/commands.c mcabber/src/utils.c |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/src/commands.c Sat Oct 21 11:07:50 2006 +0200 +++ b/mcabber/src/commands.c Sat Oct 21 11:22:15 2006 +0200 @@ -518,7 +518,8 @@ } else if (!strcasecmp(subcmd, "alternate")) { scr_RosterJumpAlternate(); } else if (!strncasecmp(subcmd, "search", 6)) { - if (!*arg) { + strip_arg_special_chars(arg); + if (!arg || !*arg) { scr_LogPrint(LPRINT_NORMAL, "What name or JID are you looking for?"); free_arg_lst(paramlst); return; @@ -1102,8 +1103,10 @@ } else if (!strcasecmp(subcmd, "down")) { buffer_updown(1, arg); } else if (!strcasecmp(subcmd, "search_backward")) { + strip_arg_special_chars(arg); buffer_search(-1, arg); } else if (!strcasecmp(subcmd, "search_forward")) { + strip_arg_special_chars(arg); buffer_search(1, arg); } else if (!strcasecmp(subcmd, "date")) { buffer_date(arg);