summaryrefslogtreecommitdiffstats
path: root/pattern.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-09-12 19:41:02 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-09-12 19:41:02 +0000
commit3d99b5254b7a81d4ce32663c53291ab66e406212 (patch)
tree8ffcc4b5256752e3f90cae65fbfe099ff4474629 /pattern.c
parentbc42769b83cc62cd98a81792a6d6068ce14ce649 (diff)
When entering a 'set' command on the command-line,
pressing TAB after string_var= will insert the current value of that variable. Note that this works only for variables of type 'string'. Also fixes the following buglets in command-completion: 1. doesnt work if you started the command-line with whitespace 2. Seems to think that 'Set', 'ReSeT', etc are valid commands (since it checks for 'strcasecmp' instead of 'strcmp' when completing the variable names Also fixes the following buglets in command-completion: (From: Vikas Agnihotri <VikasA@att.com>)
Diffstat (limited to 'pattern.c')
-rw-r--r--pattern.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pattern.c b/pattern.c
index 7d8c4846..b825fbb9 100644
--- a/pattern.c
+++ b/pattern.c
@@ -881,7 +881,7 @@ int mutt_pattern_func (int op, char *prompt)
BUFFER err;
int i;
- if (mutt_get_field (prompt, buf, sizeof (buf), 0) != 0 || !buf[0])
+ if (mutt_get_field (prompt, buf, sizeof (buf), M_PATTERN) != 0 || !buf[0])
return (-1);
mutt_message ("Compiling search pattern...");
@@ -994,7 +994,7 @@ int mutt_search_command (int cur, int op)
{
strfcpy (buf, LastSearch, sizeof (buf));
if (mutt_get_field ((op == OP_SEARCH) ? "Search for: " : "Reverse search for: ",
- buf, sizeof (buf), M_CLEAR) != 0 || !buf[0])
+ buf, sizeof (buf), M_CLEAR | M_PATTERN) != 0 || !buf[0])
return (-1);
if (op == OP_SEARCH)