END key jumps between start and end of current input string

This commit is contained in:
BjossiAlfreds 2024-10-18 11:34:22 +00:00
parent c49a703467
commit 993365cc6d

View file

@ -291,6 +291,7 @@ Field_Key(menufield_s *f, int key)
}
break;
case K_KP_RIGHTARROW:
case K_RIGHTARROW:
if (f->buffer[f->cursor] != '\0')
{
@ -306,6 +307,17 @@ Field_Key(menufield_s *f, int key)
}
break;
case K_END:
if (f->buffer[f->cursor] == '\0')
{
f->cursor = 0;
}
else
{
f->cursor = strlen(f->buffer);
}
break;
case K_KP_DEL:
case K_DEL:
if (f->buffer[f->cursor] != '\0')