OP_EDITOR_HISTORY_DOWN "scroll up through the history list"
OP_EDITOR_HISTORY_UP "scroll up through the history list"
OP_EDITOR_KILL_EOL "delete chars from cursor to end of line"
+OP_EDITOR_KILL_EOW "delete chars from the cursor to the end of the word"
OP_EDITOR_KILL_LINE "delete all chars on the line"
OP_EDITOR_KILL_WORD "delete the word in front of the cursor"
OP_EDITOR_QUOTE_CHAR "quote the next typed key"
}
}
break;
+
+ case OP_EDITOR_KILL_EOW:
+ /* delete to end of word */
+ for (j = curpos; j < lastchar && ISSPACE (buf[j]); j++)
+ ;
+ for ( ; j < lastchar && !ISSPACE (buf[j]); j++)
+ ;
+ for (ch = curpos; j < lastchar; j++, ch++)
+ buf[ch] = buf[j];
+ lastchar = ch;
+ redraw = M_REDRAW_EOL;
+ break;
+
case OP_EDITOR_BUFFY_CYCLE:
if (flags & M_EFILE)
{
buf[curpos] = buf[curpos-1];
buf[curpos-1] = j;
}
+ if (curpos < lastchar)
+ curpos++;
redraw = M_REDRAW_LINE;
break;
{ "forward-char", OP_EDITOR_FORWARD_CHAR, "\006" },
{ "backspace", OP_EDITOR_BACKSPACE, "\010" },
{ "kill-eol", OP_EDITOR_KILL_EOL, "\013" },
+ { "kill-eow", OP_EDITOR_KILL_EOW, "\033d" },
{ "kill-line", OP_EDITOR_KILL_LINE, "\025" },
{ "quote-char", OP_EDITOR_QUOTE_CHAR, "\026" },
{ "kill-word", OP_EDITOR_KILL_WORD, "\027" },