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

Function vi_add

extern/editline/src/vi.c:412–430  ·  view source on GitHub ↗

vi_add(): * Vi enter insert mode after the cursor * [a] */

Source from the content-addressed store, hash-verified

410 * [a]
411 */
412protected el_action_t
413/*ARGSUSED*/
414vi_add(EditLine *el, Int c __attribute__((__unused__)))
415{
416 int ret;
417
418 el->el_map.current = el->el_map.key;
419 if (el->el_line.cursor < el->el_line.lastchar) {
420 el->el_line.cursor++;
421 if (el->el_line.cursor > el->el_line.lastchar)
422 el->el_line.cursor = el->el_line.lastchar;
423 ret = CC_CURSOR;
424 } else
425 ret = CC_NORM;
426
427 cv_undo(el);
428
429 return (el_action_t)ret;
430}
431
432
433/* vi_add_at_eol():

Callers

nothing calls this directly

Calls 1

cv_undoFunction · 0.85

Tested by

no test coverage detected