diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2000-01-10 10:35:48 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2000-01-10 10:35:48 +0000 |
commit | 544e8ba393e9c1ca55b120f209383742211007c8 (patch) | |
tree | 5157baa0f2071aa0763254491475416832cdf991 /menu.c | |
parent | c8e19c984e900ede0f0c09353a96c62a6aa81445 (diff) |
Add (and use) a function mutt_str_replace, which essentially
replaces the sequence:
safe_free (&s);
s = safe_strdup (t);
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -658,8 +658,7 @@ static int menu_search (MUTTMENU *menu, int op) _("Reverse search for: "), buf, sizeof (buf), M_CLEAR) != 0 || !buf[0]) return (-1); - safe_free ((void **) &menu->searchBuf); - menu->searchBuf = safe_strdup (buf); + mutt_str_replace (&menu->searchBuf, buf); menu->searchDir = (op == OP_SEARCH) ? M_SEARCH_DOWN : M_SEARCH_UP; } else |