Changeset b6cf72f
- Timestamp:
- Sep 18, 2010, 5:07:40 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- d2fd2f7
- Parents:
- 9c1e61d4
- git-author:
- David Benjamin <davidben@mit.edu> (08/15/10 19:42:43)
- git-committer:
- David Benjamin <davidben@mit.edu> (09/18/10 17:07:40)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
commands.c
r9c1e61d4 rb6cf72f 1004 1004 "popless:start-command [initial-value]", 1005 1005 "Initializes the command field to initial-value"), 1006 1007 OWLCMD_ARGS_CTX("popless:search", owl_viewwin_command_search, OWL_CTX_POPLESS, 1008 "search lines for a particular string", 1009 "popless:search [-r] [<string>]", 1010 "The popless:search command will find lines that contain the\n" 1011 "specified string and scroll the popwin there. If no string\n" 1012 "argument is supplied then the previous one is used. By\n" 1013 "default searches are done forwards; if -r is used the search\n" 1014 "is performed backwards"), 1006 1015 1007 1016 OWLCMD_ALIAS("webzephyr", "zwrite daemon.webzephyr -c webzephyr -i"), -
keys.c
r09ceee3 rb6cf72f 214 214 BIND_CMD(":", "popless:start-command", "start a new command"); 215 215 BIND_CMD("M-x", "popless:start-command", "start a new command"); 216 217 BIND_CMD("/", "popless:start-command popless:search ", "start a search command"); 218 BIND_CMD("?", "popless:start-command popless:search -r ", "start a reverse search command"); 219 BIND_CMD("n", "popless:search", "find next occurrence of search"); 220 BIND_CMD("N", "popless:search -r", "find previous occurrence of search"); 216 221 217 222 BIND_CMD("C-l", "redisplay", ""); -
viewwin.c
r9c1e61d4 rb6cf72f 140 140 } 141 141 wattroff(curswin, A_REVERSE); 142 } 143 144 char *owl_viewwin_command_search(owl_viewwin *v, int argc, const char *const *argv, const char *buff) 145 { 146 int direction, mode; 147 const char *buffstart; 148 149 direction=OWL_DIRECTION_DOWNWARDS; 150 buffstart=skiptokens(buff, 1); 151 if (argc>1 && !strcmp(argv[1], "-r")) { 152 direction=OWL_DIRECTION_UPWARDS; 153 buffstart=skiptokens(buff, 2); 154 } 155 156 if (argc==1 || (argc==2 && !strcmp(argv[1], "-r"))) { 157 mode = OWL_SEARCH_CONTINUE; 158 } else { 159 owl_function_set_search(buffstart); 160 mode = OWL_SEARCH_MATCH_CURRENT; 161 } 162 163 if (!owl_viewwin_search(v, owl_global_get_search_re(&g), mode, direction)) 164 owl_function_error("No more matches"); 165 return NULL; 142 166 } 143 167
Note: See TracChangeset
for help on using the changeset viewer.