Changeset 987ff51 for commands.c


Ignore:
Timestamp:
May 19, 2007, 6:35:30 PM (14 years ago)
Author:
David Glasser <glasser@davidglasser.net>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
693c8f2
Parents:
cd57601
Message:
Add a "setsearch" command which sets the search highlight string without
moving the cursor.

* commands.c
  (commands_to_init): Add "setsearch" command and documentation.
  (owl_command_setsearch): Implementation of new command.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    r8fa9562 r987ff51  
    712712              "default searches are done fowards, if -r is used the search\n"
    713713              "is performed backwards"),
     714
     715  OWLCMD_ARGS("setsearch", owl_command_setsearch, OWL_CTX_INTERACTIVE,
     716              "set the search highlight string without searching",
     717              "setsearch <string>",
     718              "The setsearch command highlights all occurences of its\n"
     719          "argument and makes it the default argument for future\n"
     720          "search commands, but does not move the cursor.  With\n"
     721          "no argument, it makes search inactive."),
    714722
    715723  OWLCMD_ARGS("aimlogin", owl_command_aimlogin, OWL_CTX_ANY,
     
    23842392}
    23852393
     2394char *owl_command_setsearch(int argc, char **argv, char *buff)
     2395{
     2396  char *buffstart;
     2397
     2398  buffstart=skiptokens(buff, 1);
     2399
     2400  owl_global_set_search_active(&g, buffstart);
     2401
     2402  if (!*buffstart) {
     2403    owl_global_set_search_inactive(&g);
     2404  }
     2405
     2406  owl_mainwin_redisplay(owl_global_get_mainwin(&g));
     2407 
     2408  return(NULL);
     2409}
     2410
    23862411char *owl_command_aimlogin(int argc, char **argv, char *buff)
    23872412{
Note: See TracChangeset for help on using the changeset viewer.