MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / cv_next_word

Function cv_next_word

extern/editline/src/chared.c:277–300  ·  view source on GitHub ↗

cv_next_word(): * Find the next word vi style */

Source from the content-addressed store, hash-verified

275 * Find the next word vi style
276 */
277protected Char *
278cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(Int))
279{
280 int test;
281
282 while (n--) {
283 test = (*wtest)(*p);
284 while ((p < high) && (*wtest)(*p) == test)
285 p++;
286 /*
287 * vi historically deletes with cw only the word preserving the
288 * trailing whitespace! This is not what 'w' does..
289 */
290 if (n || el->el_chared.c_vcmd.action != (DELETE|INSERT))
291 while ((p < high) && Isspace(*p))
292 p++;
293 }
294
295 /* p now points where we want it */
296 if (p > high)
297 return high;
298 else
299 return p;
300}
301
302
303/* cv_prev_word():

Callers 2

vi_next_big_wordFunction · 0.85
vi_next_wordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected