Lines Matching defs:undo

208  * undo command. It records a copy of the input line from before
248 ViUndo undo; /* Information needed to implement the vi */
249 /* undo command. */
1065 * by the vi undo command.
1440 {"vi-undo", gl_vi_undo},
1663 {"M-u", "vi-undo"},
1816 gl->vi.undo.line = NULL;
1817 gl->vi.undo.buff_curpos = 0;
1818 gl->vi.undo.ntotal = 0;
1819 gl->vi.undo.saved = 0;
1948 * Allocate a vi undo buffer.
1950 gl->vi.undo.line = (char *) malloc(linelen + 2);
1951 if(!gl->vi.undo.line) {
1955 gl->vi.undo.line[0] = '\0';
2077 if(gl->vi.undo.line)
2078 free(gl->vi.undo.line);
4240 * use by vi-undo.
4272 * use by vi-undo.
4357 * use by vi-undo.
4380 * from the undo buffer.
4385 * undo buffer?
4387 int nrestore = gl->buff_curpos + nc <= gl->vi.undo.ntotal ?
4388 nc : gl->vi.undo.ntotal - gl->buff_curpos;
4393 gl_buffer_string(gl, gl->vi.undo.line + gl->buff_curpos, nrestore,
4397 * If their were insufficient characters in the undo buffer, then this
4399 * to terminate the line either where the undo buffer ran out, or if
4400 * we are deleting from beyond the end of the undo buffer, at the current
4404 gl_truncate_buffer(gl, (gl->vi.undo.ntotal > gl->buff_curpos) ?
4405 gl->vi.undo.ntotal : gl->buff_curpos);
4455 * use by vi-undo.
4498 * use by vi-undo.
4527 * use by vi-undo.
4575 * use by vi-undo.
4672 * use by vi-undo.
4708 * use by vi-undo.
4748 * use by vi-undo.
4886 * use by vi-undo.
4975 * use by vi-undo.
5064 * use by vi-undo.
5102 * use by vi-undo.
5642 * vi-undo.
6085 * by vi-undo.
6991 * use by vi-undo.
7010 * use by vi-undo.
7035 * use by vi-undo.
7143 * use by vi-undo.
7799 * historical buffer needed by the undo command. In emacs mode it does
7801 * functions, gl_interpret_char() sets gl->vi.undo.saved to 0 before
7810 if(gl->vi.command && !gl->vi.undo.saved) {
7811 strlcpy(gl->vi.undo.line, gl->line, gl->linelen);
7812 gl->vi.undo.buff_curpos = gl->buff_curpos;
7813 gl->vi.undo.ntotal = gl->ntotal;
7814 gl->vi.undo.saved = 1;
7828 * undo operation itself can subsequently be undone.
7835 char *undo_ptr = gl->vi.undo.line;
7849 if(gl->ntotal > gl->vi.undo.ntotal) {
7859 gl->vi.undo.ntotal = gl->ntotal;
7868 if(gl->buff_curpos < gl->vi.undo.buff_curpos)
7869 gl->vi.undo.buff_curpos = gl->buff_curpos;
7871 gl->buff_curpos = gl->vi.undo.buff_curpos;
8072 gl->vi.repeat.command_curpos <= gl->vi.undo.ntotal) {
8074 * Using the current line which is saved in the undo buffer, plus
8080 if(gl_add_char_to_line(gl, gl->vi.undo.line[i]))
8280 * Mark the current line as not yet preserved for use by the vi undo command.
8282 gl->vi.undo.saved = 0;
8986 * no need to undo this before returning.
10472 gl->vi.undo.line[0] = '\0';
10473 gl->vi.undo.ntotal = 0;
10474 gl->vi.undo.buff_curpos = 0;