Changeset 2ec737f for functions.c


Ignore:
Timestamp:
Sep 18, 2010, 5:07:40 PM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
a728387
Parents:
09ceee3
git-author:
David Benjamin <davidben@mit.edu> (08/15/10 19:28:29)
git-committer:
David Benjamin <davidben@mit.edu> (09/18/10 17:07:40)
Message:
Add owl_function_set_search

Instead of allowing OWL_DIRECTION_NONE in owl_function_search_start,
make the setsearch command just call a more approriately named function.

Also, move the mainwin redisplay into owl_global_set_search_re.
Although, really it should just emit a signal.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    rfc5eef4 r2ec737f  
    28862886}
    28872887
    2888 void owl_function_search_start(const char *string, int direction)
    2889 {
    2890   /* direction is OWL_DIRECTION_DOWNWARDS or OWL_DIRECTION_UPWARDS or
    2891    * OWL_DIRECTION_NONE */
     2888void owl_function_set_search(const char *string)
     2889{
    28922890  owl_regex re;
    28932891
     
    28982896    owl_global_set_search_re(&g, NULL);
    28992897  }
    2900 
    2901   if (direction == OWL_DIRECTION_NONE)
    2902     owl_mainwin_redisplay(owl_global_get_mainwin(&g));
    2903   else
    2904     owl_function_search_helper(0, direction);
     2898}
     2899
     2900void owl_function_search_start(const char *string, int direction)
     2901{
     2902  /* direction is OWL_DIRECTION_DOWNWARDS or OWL_DIRECTION_UPWARDS */
     2903  owl_function_set_search(string);
     2904  owl_function_search_helper(0, direction);
    29052905}
    29062906
Note: See TracChangeset for help on using the changeset viewer.