Merge branch 'word-delet' into 'next'
Word delete and backspace in console See merge request STJr/SRB2!1092
This commit is contained in:
commit
8301e4f93c
|
@ -956,6 +956,44 @@ boolean CON_Responder(event_t *ev)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// backspace and delete command prompt
|
||||||
|
if (input_sel != input_cur)
|
||||||
|
{
|
||||||
|
if (key == KEY_BACKSPACE || key == KEY_DEL)
|
||||||
|
{
|
||||||
|
CON_InputDelSelection();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (key == KEY_BACKSPACE)
|
||||||
|
{
|
||||||
|
if (ctrldown)
|
||||||
|
{
|
||||||
|
input_sel = M_JumpWordReverse(inputlines[inputline], input_cur);
|
||||||
|
CON_InputDelSelection();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CON_InputDelChar();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (key == KEY_DEL)
|
||||||
|
{
|
||||||
|
if (input_cur == input_len)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (ctrldown)
|
||||||
|
{
|
||||||
|
input_sel = input_cur + M_JumpWord(&inputlines[inputline][input_cur]);
|
||||||
|
CON_InputDelSelection();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
++input_cur;
|
||||||
|
CON_InputDelChar();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// ctrl modifier -- changes behavior, adds shortcuts
|
// ctrl modifier -- changes behavior, adds shortcuts
|
||||||
if (ctrldown)
|
if (ctrldown)
|
||||||
{
|
{
|
||||||
|
@ -1146,29 +1184,6 @@ boolean CON_Responder(event_t *ev)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// backspace and delete command prompt
|
|
||||||
if (input_sel != input_cur)
|
|
||||||
{
|
|
||||||
if (key == KEY_BACKSPACE || key == KEY_DEL)
|
|
||||||
{
|
|
||||||
CON_InputDelSelection();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (key == KEY_BACKSPACE)
|
|
||||||
{
|
|
||||||
CON_InputDelChar();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (key == KEY_DEL)
|
|
||||||
{
|
|
||||||
if (input_cur == input_len)
|
|
||||||
return true;
|
|
||||||
++input_cur;
|
|
||||||
CON_InputDelChar();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// move back in input history
|
// move back in input history
|
||||||
if (key == KEY_UPARROW)
|
if (key == KEY_UPARROW)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue