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

Function em_delete_or_list

extern/editline/src/emacs.c:53–82  ·  view source on GitHub ↗

em_delete_or_list(): * Delete character under cursor or list completions if at end of line * [^D] */

Source from the content-addressed store, hash-verified

51 * [^D]
52 */
53protected el_action_t
54/*ARGSUSED*/
55em_delete_or_list(EditLine *el, Int c)
56{
57
58 if (el->el_line.cursor == el->el_line.lastchar) {
59 /* if I'm at the end */
60 if (el->el_line.cursor == el->el_line.buffer) {
61 /* and the beginning */
62 terminal_writec(el, c); /* then do an EOF */
63 return CC_EOF;
64 } else {
65 /*
66 * Here we could list completions, but it is an
67 * error right now
68 */
69 terminal_beep(el);
70 return CC_ERROR;
71 }
72 } else {
73 if (el->el_state.doingarg)
74 c_delafter(el, el->el_state.argument);
75 else
76 c_delafter1(el);
77 if (el->el_line.cursor > el->el_line.lastchar)
78 el->el_line.cursor = el->el_line.lastchar;
79 /* bounds check */
80 return CC_REFRESH;
81 }
82}
83
84
85/* em_delete_next_word():

Callers

nothing calls this directly

Calls 4

terminal_writecFunction · 0.85
terminal_beepFunction · 0.85
c_delafterFunction · 0.85
c_delafter1Function · 0.85

Tested by

no test coverage detected