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

Function c_delafter

extern/editline/src/chared.c:117–137  ·  view source on GitHub ↗

c_delafter(): * Delete num characters after the cursor */

Source from the content-addressed store, hash-verified

115 * Delete num characters after the cursor
116 */
117protected void
118c_delafter(EditLine *el, int num)
119{
120
121 if (el->el_line.cursor + num > el->el_line.lastchar)
122 num = (int)(el->el_line.lastchar - el->el_line.cursor);
123
124 if (el->el_map.current != el->el_map.emacs) {
125 cv_undo(el);
126 cv_yank(el, el->el_line.cursor, num);
127 }
128
129 if (num > 0) {
130 Char *cp;
131
132 for (cp = el->el_line.cursor; cp <= el->el_line.lastchar; cp++)
133 *cp = cp[num];
134
135 el->el_line.lastchar -= num;
136 }
137}
138
139
140/* c_delafter1():

Callers 6

vi_substitute_charFunction · 0.85
ed_delete_next_charFunction · 0.85
em_delete_or_listFunction · 0.85
em_delete_next_wordFunction · 0.85
em_kill_regionFunction · 0.85
cv_delfiniFunction · 0.85

Calls 2

cv_undoFunction · 0.85
cv_yankFunction · 0.85

Tested by

no test coverage detected