Left word jump (whoo that took long)

This commit is contained in:
James R 2020-01-08 02:54:17 -08:00
parent 9e703f935a
commit 0d3c03ccd6
1 changed files with 25 additions and 1 deletions

View File

@ -820,7 +820,31 @@ boolean CON_Responder(event_t *ev)
if (key == KEY_LEFTARROW)
{
if (input_cur != 0)
--input_cur;
{
if (ctrldown)
{
int (*is)(int);
char *line;
int c;
line = inputlines[inputline];
c = line[--input_cur];
if (isspace(c))
is = isspace;
else if (ispunct(c))
is = ispunct;
else
is = isalnum;
c = (*is)(line[input_cur]);
while (input_cur > 0 &&
(*is)(line[input_cur - 1]) == c)
input_cur--;
}
else
{
--input_cur;
}
}
if (!shiftdown)
input_sel = input_cur;
return true;