vi_kill_line_prev(): * Vi cut from beginning of line to cursor * [^U] */
| 639 | * [^U] |
| 640 | */ |
| 641 | protected el_action_t |
| 642 | /*ARGSUSED*/ |
| 643 | vi_kill_line_prev(EditLine *el, Int c __attribute__((__unused__))) |
| 644 | { |
| 645 | Char *kp, *cp; |
| 646 | |
| 647 | cp = el->el_line.buffer; |
| 648 | kp = el->el_chared.c_kill.buf; |
| 649 | while (cp < el->el_line.cursor) |
| 650 | *kp++ = *cp++; /* copy it */ |
| 651 | el->el_chared.c_kill.last = kp; |
| 652 | c_delbefore(el, (int)(el->el_line.cursor - el->el_line.buffer)); |
| 653 | el->el_line.cursor = el->el_line.buffer; /* zap! */ |
| 654 | return CC_REFRESH; |
| 655 | } |
| 656 | |
| 657 | |
| 658 | /* vi_search_prev(): |
nothing calls this directly
no test coverage detected