ed_next_history(): * Move to the next history line * [^N] [j] */
| 675 | * [^N] [j] |
| 676 | */ |
| 677 | protected el_action_t |
| 678 | /*ARGSUSED*/ |
| 679 | ed_next_history(EditLine *el, Int c __attribute__((__unused__))) |
| 680 | { |
| 681 | el_action_t beep = CC_REFRESH, rval; |
| 682 | |
| 683 | el->el_chared.c_undo.len = -1; |
| 684 | *el->el_line.lastchar = '\0'; /* just in case */ |
| 685 | |
| 686 | el->el_history.eventno -= el->el_state.argument; |
| 687 | |
| 688 | if (el->el_history.eventno < 0) { |
| 689 | el->el_history.eventno = 0; |
| 690 | beep = CC_REFRESH_BEEP; |
| 691 | } |
| 692 | rval = hist_get(el); |
| 693 | if (rval == CC_REFRESH) |
| 694 | return beep; |
| 695 | return rval; |
| 696 | |
| 697 | } |
| 698 | |
| 699 | |
| 700 | /* ed_search_prev_history(): |
nothing calls this directly
no test coverage detected