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

Function cv_delfini

extern/editline/src/chared.c:332–364  ·  view source on GitHub ↗

cv_delfini(): * Finish vi delete action */

Source from the content-addressed store, hash-verified

330 * Finish vi delete action
331 */
332protected void
333cv_delfini(EditLine *el)
334{
335 int size;
336 int action = el->el_chared.c_vcmd.action;
337
338 if (action & INSERT)
339 el->el_map.current = el->el_map.key;
340
341 if (el->el_chared.c_vcmd.pos == 0)
342 /* sanity */
343 return;
344
345 size = (int)(el->el_line.cursor - el->el_chared.c_vcmd.pos);
346 if (size == 0)
347 size = 1;
348 el->el_line.cursor = el->el_chared.c_vcmd.pos;
349 if (action & YANK) {
350 if (size > 0)
351 cv_yank(el, el->el_line.cursor, size);
352 else
353 cv_yank(el, el->el_line.cursor + size, -size);
354 } else {
355 if (size > 0) {
356 c_delafter(el, size);
357 re_refresh_cursor(el);
358 } else {
359 c_delbefore(el, -size);
360 el->el_line.cursor += size;
361 }
362 }
363 el->el_chared.c_vcmd.action = NOP;
364}
365
366
367/* cv__endword():

Callers 15

vi_prev_big_wordFunction · 0.85
vi_prev_wordFunction · 0.85
vi_next_big_wordFunction · 0.85
vi_next_wordFunction · 0.85
vi_end_big_wordFunction · 0.85
vi_end_wordFunction · 0.85
vi_zeroFunction · 0.85
vi_matchFunction · 0.85
ed_move_to_endFunction · 0.85
ed_move_to_begFunction · 0.85
ed_next_charFunction · 0.85
ed_prev_wordFunction · 0.85

Calls 4

cv_yankFunction · 0.85
c_delafterFunction · 0.85
re_refresh_cursorFunction · 0.85
c_delbeforeFunction · 0.85

Tested by

no test coverage detected