/* vi_list_or_eof(): * Vi list choices for completion or indicate end of file if empty line * [^D] */ libedit_private el_action_t /*ARGSUSED*/ vi_list_or_eof(EditLine *el, wint_t c) { if (el->el_line.cursor == el->el_line.lastchar) { if (el->el_line.cursor == el->el_line.buffer) { terminal_writec(el, c); /* then do a EOF */ return CC_EOF; } else { /* * Here we could list completions, but it is an * error right now */ terminal_beep(el); return CC_ERROR; } } else { #ifdef notyet re_goto_bottom(el); *el->el_line.lastchar = '\0'; /* just in case */ return CC_LIST_CHOICES; #else /* * Just complain for now. */ terminal_beep(el); return CC_ERROR; #endif } }
/* ed_end_of_file(): * Indicate end of file * [^D] */ libedit_private el_action_t /*ARGSUSED*/ ed_end_of_file(EditLine *el, wint_t c __attribute__((__unused__))) { re_goto_bottom(el); *el->el_line.lastchar = '\0'; return CC_EOF; }
/* ed_end_of_file(): * Indicate end of file * [^D] */ protected el_action_t /*ARGSUSED*/ ed_end_of_file(EditLine *el, Int c __attribute__((__unused__))) { re_goto_bottom(el); *el->el_line.lastchar = '\0'; return (CC_EOF); }