On Tue, Nov 17, 2009 at 10:14:27PM +1030, David Kettler wrote:
> Currently the match_required state is set at the beginning when input
> is being read.  This commit allows completers to change that state
> during the input.  In particular, this can be used to allow a webjump
> with a limited set of valid inputs to prevent invalid inputs from
> being accepted.
> 
> For example, the following webjump can now be defined and will only
> allow valid bookmarks to be chosen.  Without $match_required, the webjump
> will try to visit any arbitrary input, which is confusing and not useful.
> 
>   /* Access bookmarks via completion from a webjump. */
>   define_webjump("bookmark",
>                  function(term) {return term;},
>                  $completer = history_completer($use_history = false,
>                                                 $use_bookmarks = true,
>                                                 $match_required = true));
> 
> Another example is in the upcoming index webjump feature.
> ---
> 
> Note: In merge_completers I think the destroy function needs something
> like call_all('destroy'), rather than forward().



Cool feature.  Okay

-- 
John Foerch
_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror

Reply via email to