X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=mod_query%2Fwedln.c;h=1c43db2a7cf3402241ce00bf80bf25741e2c71c7;hp=470b05b8bee51b2e665b05ba8e63b2d8bcbcc68c;hb=e3aec18706513a87eaa7839dfdaf7e0fcd0d8d2a;hpb=de22e45179cb3bafa490294d31d47f361047a30a diff --git a/mod_query/wedln.c b/mod_query/wedln.c index 470b05b..1c43db2 100644 --- a/mod_query/wedln.c +++ b/mod_query/wedln.c @@ -1,12 +1,9 @@ /* * ion/mod_query/wedln.c * - * Copyright (c) Tuomo Valkonen 1999-2007. + * Copyright (c) Tuomo Valkonen 1999-2009. * - * Ion is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. + * See the included file LICENSE for details. */ #include @@ -377,7 +374,7 @@ void wedln_size_hints(WEdln *wedln, WSizeHints *hints_ret) /*{{{ Draw */ -void wedln_draw_completions(WEdln *wedln, bool complete) +void wedln_draw_completions(WEdln *wedln, int mode) { WRectangle geom; @@ -385,7 +382,7 @@ void wedln_draw_completions(WEdln *wedln, bool complete) get_completions_geom(wedln, G_CURRENT, &geom); draw_listing(WEDLN_BRUSH(wedln), &geom, &(wedln->compl_list), - complete, GR_ATTR(selection)); + mode, GR_ATTR(selection)); } } @@ -452,7 +449,7 @@ static void wedln_draw_(WEdln *wedln, bool complete, bool completions) : GR_ATTR(inactive)); if(completions) - wedln_draw_completions(wedln, FALSE); + wedln_draw_completions(wedln, LISTING_DRAW_ALL); wedln_draw_textarea(wedln); @@ -522,7 +519,7 @@ static void wedln_show_completions(WEdln *wedln, char **strs, int nstrs, input_refit((WInput*)wedln); if(w==REGION_GEOM(wedln).w && h==REGION_GEOM(wedln).h) - wedln_draw_completions(wedln, TRUE); + wedln_draw_completions(wedln, LISTING_DRAW_COMPLETE); } @@ -540,7 +537,7 @@ void wedln_scrollup_completions(WEdln *wedln) if(wedln->compl_list.strs==NULL) return; if(scrollup_listing(&(wedln->compl_list))) - wedln_draw_completions(wedln, TRUE); + wedln_draw_completions(wedln, LISTING_DRAW_COMPLETE); } @@ -549,7 +546,7 @@ void wedln_scrolldown_completions(WEdln *wedln) if(wedln->compl_list.strs==NULL) return; if(scrolldown_listing(&(wedln->compl_list))) - wedln_draw_completions(wedln, TRUE); + wedln_draw_completions(wedln, LISTING_DRAW_COMPLETE); } @@ -643,8 +640,8 @@ allocfail: static void wedln_do_select_completion(WEdln *wedln, int n) { - bool complredraw=listing_select(&(wedln->compl_list), n); - wedln_draw_completions(wedln, complredraw); + bool redraw=listing_select(&(wedln->compl_list), n); + wedln_draw_completions(wedln, redraw); update_nocompl++; edln_set_completion(&(wedln->edln), wedln->compl_list.strs[n], @@ -787,11 +784,12 @@ bool wedln_prev_completion(WEdln *wedln) /*EXTL_DOC * Call completion handler with the text between the beginning of line and * current cursor position, or select next/previous completion from list if in - * auto-show-completions mode and \var{cycle} is set to ``next'' or ``prev'', - * respectively. The \var{mode} may be ``history'' or ``normal''. If it is + * auto-show-completions mode and \var{cycle} is set to \codestr{next} or + * \codestr{prev}, respectively. + * The \var{mode} may be \codestr{history} or \codestr{normal}. If it is * not set, the previous mode is used. Normally next entry is not cycled to * despite the setting of \var{cycle} if mode switch occurs. To override - * this, use ``next-always'' and ``prev-always'' for \var{cycle}. + * this, use \codestr{next-always} and \codestr{prev-always} for \var{cycle}. */ EXTL_EXPORT_MEMBER void wedln_complete(WEdln *wedln, const char *cycle, const char *mode)