Lines Matching defs:eol

436 find_next_word(char *cursor, char *eol)
438 while (cursor < eol && *cursor != ' ')
440 while (cursor < eol && *cursor == ' ')
501 char *p, *cursor, *eol, *tp, *cp;
521 for (cursor = eol = buf; ; ) {
530 if (cursor > eol)
531 eol = cursor;
554 tp = find_next_word(cursor, eol);
568 tp = find_next_word(cursor, eol);
573 memmove(cursor, tp, eol - tp);
574 redraw_line(env, buf, cursor, eol, buf, cursor,
575 eol - len);
576 eol -= len;
585 if (cursor > eol)
586 eol = cursor;
596 if (cursor < eol)
606 do_emit_str(env, cursor, eol - cursor);
607 cursor = eol;
617 do_save_buf(save_line, buf, eol - buf);
627 redraw_line(env, buf, cursor, eol,
631 eol = buf + len;
638 redraw_line(env, buf, cursor, eol, p, p, p + len);
641 eol = buf + len;
647 case CTRL('k'): /* Erase from cursor to eol, saving */
648 /* chars, at eol, joins two lines */
649 if (cursor == eol) {
662 len = min(len, MAX_LINE_SIZE - (eol - buf));
663 memcpy(eol, p, len);
664 redraw_line(env, buf, cursor, eol, buf, cursor,
665 eol + len);
666 eol += len;
669 do_save_buf(save_buf, cursor, eol - cursor);
670 redraw_line(env, buf, cursor, eol, buf, cursor,
672 eol = cursor;
681 memmove(tp, cursor, eol - cursor);
682 redraw_line(env, buf, cursor, eol, buf, cursor - len,
683 eol - len);
684 eol -= len;
689 do_save_buf(save_buf, buf, eol - buf);
690 redraw_line(env, buf, cursor, eol, buf, buf, buf);
692 eol = buf;
697 MAX_LINE_SIZE - (eol - buf));
700 memmove(cursor + len, cursor, eol - cursor);
702 redraw_line(env, buf, cursor, eol, buf, cursor + len,
703 eol + len);
705 eol += len;
719 redraw_line(env, buf, buf, buf, buf, cursor, eol);
723 redraw_line(env, buf, cursor, eol, buf, cursor, eol);
740 memmove(cursor - 1, cursor, eol - cursor);
741 redraw_line(env, buf, cursor, eol, buf, cursor - 1,
742 eol - 1);
744 eol--;
749 *eol = '\0';